@pnp/cli-microsoft365 7.0.0-beta.7f98bac → 7.0.0-beta.8726fe8
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 -3
- package/README.md +4 -4
- package/dist/Auth.js +12 -2
- package/dist/Command.js +3 -3
- package/dist/GlobalOptions.js +1 -7
- package/dist/cli/Cli.js +24 -7
- package/dist/m365/aad/commands/app/app-add.js +8 -8
- package/dist/m365/aad/commands/app/app-get.js +4 -1
- package/dist/m365/aad/commands/app/app-remove.js +3 -1
- package/dist/m365/aad/commands/app/app-role-add.js +9 -6
- package/dist/m365/aad/commands/app/app-role-list.js +4 -1
- package/dist/m365/aad/commands/app/app-role-remove.js +5 -2
- package/dist/m365/aad/commands/app/app-set.js +13 -10
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +11 -6
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +4 -4
- package/dist/m365/aad/commands/group/group-get.js +4 -4
- package/dist/m365/aad/commands/group/group-list.js +1 -23
- package/dist/m365/aad/commands/group/group-remove.js +98 -0
- package/dist/m365/aad/commands/{o365group/o365group-add.js → m365group/m365group-add.js} +38 -29
- package/dist/m365/aad/commands/{o365group/o365group-conversation-list.js → m365group/m365group-conversation-list.js} +10 -10
- package/dist/m365/aad/commands/{o365group/o365group-conversation-post-list.js → m365group/m365group-conversation-post-list.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-get.js → m365group/m365group-get.js} +13 -10
- package/dist/m365/aad/commands/{o365group/o365group-list.js → m365group/m365group-list.js} +13 -28
- package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-clear.js → m365group/m365group-recyclebinitem-clear.js} +15 -15
- package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-list.js → m365group/m365group-recyclebinitem-list.js} +10 -10
- package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-remove.js → m365group/m365group-recyclebinitem-remove.js} +17 -15
- package/dist/m365/aad/commands/{o365group/o365group-recyclebinitem-restore.js → m365group/m365group-recyclebinitem-restore.js} +18 -15
- package/dist/m365/aad/commands/{o365group/o365group-remove.js → m365group/m365group-remove.js} +12 -12
- package/dist/m365/aad/commands/{o365group/o365group-renew.js → m365group/m365group-renew.js} +10 -10
- package/dist/m365/aad/commands/{o365group/o365group-report-activitycounts.js → m365group/m365group-report-activitycounts.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-report-activitydetail.js → m365group/m365group-report-activitydetail.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-report-activityfilecounts.js → m365group/m365group-report-activityfilecounts.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-report-activitygroupcounts.js → m365group/m365group-report-activitygroupcounts.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-report-activitystorage.js → m365group/m365group-report-activitystorage.js} +4 -4
- package/dist/m365/aad/commands/{o365group/o365group-set.js → m365group/m365group-set.js} +17 -17
- package/dist/m365/aad/commands/{o365group/o365group-teamify.js → m365group/m365group-teamify.js} +18 -15
- package/dist/m365/aad/commands/{o365group/o365group-user-add.js → m365group/m365group-user-add.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-user-list.js → m365group/m365group-user-list.js} +12 -12
- package/dist/m365/aad/commands/{o365group/o365group-user-remove.js → m365group/m365group-user-remove.js} +14 -14
- package/dist/m365/aad/commands/{o365group/o365group-user-set.js → m365group/m365group-user-set.js} +15 -15
- package/dist/m365/aad/commands/policy/policy-list.js +5 -5
- package/dist/m365/aad/commands/sp/sp-add.js +4 -1
- package/dist/m365/aad/commands/sp/sp-get.js +4 -1
- package/dist/m365/aad/commands/user/user-get.js +7 -2
- package/dist/m365/aad/commands.js +23 -22
- package/dist/m365/booking/commands/business/business-get.js +4 -1
- package/dist/m365/cli/commands/cli-issue.js +5 -5
- package/dist/m365/cli/commands/config/config-get.js +5 -5
- package/dist/m365/cli/commands/config/config-list.js +16 -0
- package/dist/m365/cli/commands/config/config-reset.js +5 -5
- package/dist/m365/cli/commands/config/config-set.js +5 -5
- package/dist/m365/cli/commands.js +1 -0
- package/dist/m365/commands/login.js +7 -7
- package/dist/m365/commands/request.js +1 -1
- package/dist/m365/flow/commands/owner/owner-ensure.js +5 -5
- package/dist/m365/graph/commands/subscription/subscription-add.js +5 -5
- package/dist/m365/outlook/commands/message/message-list.js +4 -2
- package/dist/m365/outlook/commands/message/message-move.js +4 -2
- package/dist/m365/pa/commands/app/app-export.js +7 -7
- package/dist/m365/pa/commands/app/app-owner-set.js +5 -5
- package/dist/m365/pa/commands/app/app-permission-ensure.js +162 -0
- package/dist/m365/pa/commands/app/app-permission-list.js +2 -2
- package/dist/m365/pa/commands/app/app-permission-remove.js +153 -0
- package/dist/m365/pa/commands.js +3 -4
- package/dist/m365/planner/commands/bucket/bucket-add.js +6 -3
- package/dist/m365/planner/commands/bucket/bucket-get.js +11 -4
- package/dist/m365/planner/commands/bucket/bucket-list.js +6 -3
- package/dist/m365/planner/commands/bucket/bucket-remove.js +9 -4
- package/dist/m365/planner/commands/bucket/bucket-set.js +10 -4
- package/dist/m365/planner/commands/plan/plan-add.js +4 -1
- package/dist/m365/planner/commands/plan/plan-get.js +5 -3
- package/dist/m365/planner/commands/plan/plan-list.js +8 -6
- package/dist/m365/planner/commands/plan/plan-remove.js +4 -1
- package/dist/m365/planner/commands/plan/plan-set.js +6 -3
- package/dist/m365/planner/commands/roster/roster-get.js +4 -1
- package/dist/m365/planner/commands/roster/roster-member-add.js +4 -1
- package/dist/m365/planner/commands/roster/roster-member-get.js +4 -1
- package/dist/m365/planner/commands/roster/roster-member-list.js +4 -1
- package/dist/m365/planner/commands/roster/roster-member-remove.js +4 -1
- package/dist/m365/planner/commands/roster/roster-plan-list.js +4 -1
- package/dist/m365/planner/commands/roster/roster-remove.js +4 -1
- package/dist/m365/planner/commands/task/task-add.js +21 -12
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +4 -1
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +4 -1
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +4 -1
- package/dist/m365/planner/commands/task/task-get.js +46 -28
- package/dist/m365/planner/commands/task/task-list.js +34 -19
- package/dist/m365/planner/commands/task/task-reference-add.js +4 -1
- package/dist/m365/planner/commands/task/task-reference-list.js +4 -1
- package/dist/m365/planner/commands/task/task-reference-remove.js +4 -1
- package/dist/m365/planner/commands/task/task-remove.js +49 -38
- package/dist/m365/planner/commands/task/task-set.js +38 -23
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +4 -1
- package/dist/m365/pp/commands/card/card-get.js +3 -5
- package/dist/m365/pp/commands/chatbot/chatbot-get.js +3 -1
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +4 -1
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +14 -14
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +3 -1
- package/dist/m365/spfx/commands/package/package-generate.js +15 -15
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +55 -0
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.0-beta.1.js → doctor-1.18.0.js} +2 -2
- package/dist/m365/spfx/commands/project/project-doctor.js +9 -9
- package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +2 -2
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +157 -0
- package/dist/m365/spfx/commands/project/project-github-workflow-model.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001022_DEP_office_ui_fabric_react.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002028_DEVDEP_microsoft_rush_stack_compiler_4_7.js +13 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.1.js → upgrade-1.18.0.js} +35 -27
- package/dist/m365/spfx/commands/project/project-upgrade.js +26 -28
- package/dist/m365/spfx/commands/spfx-doctor.js +76 -106
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +27 -26
- package/dist/m365/spo/commands/app/app-add.js +9 -9
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +5 -5
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +5 -3
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +5 -5
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +2 -2
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +3 -2
- package/dist/m365/spo/commands/commandset/commandset-add.js +11 -11
- package/dist/m365/spo/commands/commandset/commandset-get.js +12 -10
- package/dist/m365/spo/commands/commandset/commandset-list.js +5 -5
- package/dist/m365/spo/commands/commandset/commandset-remove.js +7 -6
- package/dist/m365/spo/commands/commandset/commandset-set.js +14 -12
- package/dist/m365/spo/commands/customaction/customaction-get.js +5 -2
- package/dist/m365/spo/commands/customaction/customaction-remove.js +3 -1
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +3 -1
- package/dist/m365/spo/commands/file/file-add.js +13 -13
- package/dist/m365/spo/commands/file/file-checkin.js +1 -1
- package/dist/m365/spo/commands/file/file-checkout.js +1 -1
- package/dist/m365/spo/commands/file/file-copy.js +36 -4
- package/dist/m365/spo/commands/file/file-get.js +11 -8
- package/dist/m365/spo/commands/file/file-list.js +4 -4
- package/dist/m365/spo/commands/file/file-move.js +74 -98
- package/dist/m365/spo/commands/file/file-remove.js +8 -8
- package/dist/m365/spo/commands/file/file-rename.js +2 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +8 -8
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +5 -5
- package/dist/m365/spo/commands/file/file-version-clear.js +3 -3
- package/dist/m365/spo/commands/file/file-version-get.js +3 -3
- package/dist/m365/spo/commands/file/file-version-list.js +3 -3
- package/dist/m365/spo/commands/file/file-version-remove.js +3 -3
- package/dist/m365/spo/commands/file/file-version-restore.js +3 -3
- package/dist/m365/spo/commands/folder/folder-add.js +2 -4
- package/dist/m365/spo/commands/folder/folder-copy.js +89 -45
- package/dist/m365/spo/commands/folder/folder-get.js +1 -1
- package/dist/m365/spo/commands/folder/folder-list.js +2 -2
- package/dist/m365/spo/commands/folder/folder-move.js +89 -47
- package/dist/m365/spo/commands/folder/folder-remove.js +7 -4
- package/dist/m365/spo/commands/folder/folder-rename.js +13 -17
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/group/group-list.js +0 -1
- package/dist/m365/spo/commands/group/group-member-add.js +24 -24
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +7 -4
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +4 -1
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +3 -1
- package/dist/m365/spo/commands/list/list-add.js +4 -4
- package/dist/m365/spo/commands/list/list-retentionlabel-ensure.js +2 -24
- package/dist/m365/spo/commands/list/list-set.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-add.js +1 -0
- package/dist/m365/spo/commands/listitem/listitem-set.js +3 -2
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +2 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +34 -5
- package/dist/m365/spo/commands/page/clientsidepages.js +19 -81
- package/dist/m365/spo/commands/page/page-get.js +1 -0
- package/dist/m365/spo/commands/page/page-list.js +4 -3
- package/dist/m365/spo/commands/page/page-section-add.js +56 -21
- package/dist/m365/spo/commands/page/page-set.js +13 -2
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +63 -59
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +28 -31
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +30 -32
- package/dist/m365/spo/commands/site/FlowsPolicy.js +7 -0
- package/dist/m365/spo/commands/site/site-add.js +114 -161
- package/dist/m365/spo/commands/site/site-apppermission-add.js +15 -18
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +34 -38
- package/dist/m365/spo/commands/site/site-apppermission-set.js +11 -14
- package/dist/m365/spo/commands/site/site-commsite-enable.js +34 -5
- package/dist/m365/spo/commands/site/site-ensure.js +14 -67
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +22 -22
- package/dist/m365/spo/commands/site/site-list.js +25 -43
- package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +6 -6
- package/dist/m365/spo/commands/site/site-remove.js +166 -210
- package/dist/m365/spo/commands/site/site-set.js +178 -199
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +1 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +12 -7
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +2 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -8
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +8 -3
- package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +3 -1
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +8 -8
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +4 -4
- package/dist/m365/spo/commands/term/term-get.js +6 -6
- package/dist/m365/spo/commands/theme/theme-list.js +1 -9
- package/dist/m365/spo/commands/theme/theme-remove.js +24 -24
- package/dist/m365/spo/commands/theme/theme-set.js +0 -1
- package/dist/m365/spo/commands/user/user-remove.js +27 -27
- package/dist/m365/spo/commands/web/web-reindex.js +35 -42
- package/dist/m365/spo/commands/web/web-remove.js +21 -21
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +16 -31
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +33 -44
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +18 -18
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +19 -19
- package/dist/m365/spo/commands/web/web-set.js +5 -5
- package/dist/m365/teams/commands/app/app-list.js +5 -5
- package/dist/m365/teams/commands/app/app-remove.js +49 -15
- package/dist/m365/teams/commands/channel/channel-add.js +5 -1
- package/dist/m365/teams/commands/channel/channel-member-add.js +12 -10
- package/dist/m365/teams/commands/channel/channel-member-remove.js +3 -1
- package/dist/m365/teams/commands/channel/channel-member-set.js +4 -1
- package/dist/m365/teams/commands/chat/chat-get.js +7 -10
- package/dist/m365/teams/commands/chat/chat-member-add.js +5 -5
- package/dist/m365/teams/commands/chat/chat-message-send.js +8 -10
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +4 -4
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +4 -4
- package/dist/m365/teams/commands/meeting/meeting-list.js +101 -51
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +4 -4
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +5 -5
- package/dist/m365/teams/commands/team/team-clone.js +5 -10
- package/dist/m365/teams/commands/team/team-list.js +94 -30
- package/dist/m365/teams/commands/team/team-set.js +3 -3
- package/dist/m365/tenant/commands/info/info-get.js +83 -0
- package/dist/m365/tenant/commands.js +1 -0
- package/dist/m365/todo/commands/task/task-add.js +6 -6
- package/dist/m365/yammer/commands/message/message-like-set.js +27 -28
- package/dist/m365/yammer/commands/message/message-list.js +67 -86
- package/dist/m365/yammer/commands/message/message-remove.js +18 -18
- package/dist/m365/yammer/commands/yammer-search.js +58 -74
- package/dist/utils/aadGroup.js +23 -3
- package/dist/utils/formatting.js +7 -0
- package/dist/utils/fsUtil.js +5 -0
- package/dist/utils/planner.js +4 -3
- package/dist/utils/powerPlatform.js +1 -1
- package/dist/utils/spo.js +595 -54
- package/dist/utils/validation.js +0 -3
- package/docs/docs/_clisettings.mdx +2 -2
- package/docs/docs/cmd/_global.mdx +1 -1
- package/docs/docs/cmd/aad/app/app-set.mdx +15 -15
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.mdx +9 -9
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.mdx +10 -10
- package/docs/docs/cmd/aad/group/group-get.mdx +5 -5
- package/docs/docs/cmd/aad/group/group-list.mdx +0 -11
- package/docs/docs/cmd/aad/group/group-remove.mdx +44 -0
- package/docs/docs/cmd/aad/{o365group/o365group-add.mdx → m365group/m365group-add.mdx} +25 -15
- package/docs/docs/cmd/aad/{o365group/o365group-conversation-list.mdx → m365group/m365group-conversation-list.mdx} +4 -4
- package/docs/docs/cmd/aad/{o365group/o365group-conversation-post-list.mdx → m365group/m365group-conversation-post-list.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-get.mdx → m365group/m365group-get.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-list.mdx → m365group/m365group-list.mdx} +12 -29
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-clear.mdx → m365group/m365group-recyclebinitem-clear.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-list.mdx → m365group/m365group-recyclebinitem-list.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-remove.mdx → m365group/m365group-recyclebinitem-remove.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-restore.mdx → m365group/m365group-recyclebinitem-restore.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-remove.mdx → m365group/m365group-remove.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-renew.mdx → m365group/m365group-renew.mdx} +4 -4
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitycounts.mdx → m365group/m365group-report-activitycounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitydetail.mdx → m365group/m365group-report-activitydetail.mdx} +7 -7
- package/docs/docs/cmd/aad/{o365group/o365group-report-activityfilecounts.mdx → m365group/m365group-report-activityfilecounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitygroupcounts.mdx → m365group/m365group-report-activitygroupcounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitystorage.mdx → m365group/m365group-report-activitystorage.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-set.mdx → m365group/m365group-set.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-teamify.mdx → m365group/m365group-teamify.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-add.mdx → m365group/m365group-user-add.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-list.mdx → m365group/m365group-user-list.mdx} +7 -7
- package/docs/docs/cmd/aad/{o365group/o365group-user-remove.mdx → m365group/m365group-user-remove.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-set.mdx → m365group/m365group-user-set.mdx} +5 -5
- package/docs/docs/cmd/aad/policy/policy-list.mdx +5 -5
- package/docs/docs/cmd/aad/user/user-set.mdx +1 -1
- package/docs/docs/cmd/cli/config/config-list.mdx +78 -0
- package/docs/docs/cmd/flow/flow-enable.mdx +2 -2
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +10 -10
- package/docs/docs/cmd/login.mdx +6 -0
- package/docs/docs/cmd/pa/app/app-export.mdx +5 -5
- package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +85 -0
- package/docs/docs/cmd/pa/app/app-permission-remove.mdx +74 -0
- package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
- package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
- package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +3 -3
- package/docs/docs/cmd/pp/solution/solution-publisher-get.mdx +2 -2
- package/docs/docs/cmd/pp/solution/solution-publisher-remove.mdx +2 -2
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -9
- package/docs/docs/cmd/spo/file/file-checkout.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-copy.mdx +20 -16
- package/docs/docs/cmd/spo/file/file-get.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-list.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-move.mdx +36 -18
- package/docs/docs/cmd/spo/file/file-remove.mdx +10 -10
- package/docs/docs/cmd/spo/file/file-rename.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-version-get.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-version-list.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +3 -3
- package/docs/docs/cmd/spo/folder/folder-add.mdx +76 -1
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +39 -12
- package/docs/docs/cmd/spo/folder/folder-get.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-list.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-move.mdx +40 -13
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +5 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/group/group-member-add.mdx +27 -27
- package/docs/docs/cmd/spo/list/list-contenttype-remove.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.mdx +2 -11
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +2 -5
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +2 -5
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +14 -1
- package/docs/docs/cmd/spo/page/page-get.mdx +0 -1
- package/docs/docs/cmd/spo/page/page-list.mdx +0 -1
- package/docs/docs/cmd/spo/page/page-section-add.mdx +25 -1
- package/docs/docs/cmd/spo/page/page-set.mdx +23 -0
- package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-commsite-enable.mdx +11 -2
- package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +3 -78
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.mdx +2 -2
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +3 -5
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +2 -4
- package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
- package/docs/docs/cmd/teams/app/app-remove.mdx +9 -6
- package/docs/docs/cmd/teams/channel/channel-member-add.mdx +4 -4
- package/docs/docs/cmd/teams/meeting/meeting-list.mdx +135 -92
- package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
- package/docs/docs/cmd/teams/team/team-clone.mdx +3 -3
- package/docs/docs/cmd/teams/team/team-list.mdx +47 -22
- package/docs/docs/cmd/tenant/info/info-get.mdx +101 -0
- package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
- package/npm-shrinkwrap.json +310 -1433
- package/package.json +22 -27
- package/dist/m365/pa/cds-project-mutator.js +0 -91
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/generated/ManifestTypes.d.ts +0 -11
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_ControlManifest.Input.xml +0 -31
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_index.ts +0 -51
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/generated/ManifestTypes.d.ts +0 -12
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_ControlManifest.Input.xml +0 -37
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_index.ts +0 -48
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/index.ts +0 -0
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_ControlManifest.Input.xml +0 -31
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_index.tsx +0 -58
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_ControlManifest.Input.xml +0 -37
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_index.tsx +0 -55
- package/dist/m365/pa/commands/pcf/pcf-init/assets/package.json +0 -19
- package/dist/m365/pa/commands/pcf/pcf-init/assets/pcfconfig.json +0 -3
- package/dist/m365/pa/commands/pcf/pcf-init/assets/template_.gitignore +0 -14
- package/dist/m365/pa/commands/pcf/pcf-init/assets/template_pcfprojecttype.pcfproj +0 -45
- package/dist/m365/pa/commands/pcf/pcf-init/pcf-init-variables.js +0 -2
- package/dist/m365/pa/commands/pcf/pcf-init.js +0 -120
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/Customizations.xml +0 -18
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/Relationships.xml +0 -2
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/template_Solution.xml +0 -94
- package/dist/m365/pa/commands/solution/solution-init/assets/template_.gitignore +0 -2
- package/dist/m365/pa/commands/solution/solution-init/assets/template_solutionprojecttype.cdsproj +0 -44
- package/dist/m365/pa/commands/solution/solution-init/solution-init-variables.js +0 -2
- package/dist/m365/pa/commands/solution/solution-init.js +0 -126
- package/dist/m365/pa/commands/solution/solution-reference-add.js +0 -88
- package/dist/m365/pa/template-instantiator.js +0 -57
- package/docs/docs/cmd/pa/pcf/pcf-init.mdx +0 -56
- package/docs/docs/cmd/pa/solution/solution-init.mdx +0 -46
- package/docs/docs/cmd/pa/solution/solution-reference-add.mdx +0 -42
- /package/dist/m365/aad/commands/{o365group → m365group}/GroupExtended.js +0 -0
|
@@ -82,24 +82,24 @@ class SpoGroupMemberAddCommand extends SpoCommand {
|
|
|
82
82
|
await logger.logToStderr('Checking if the specified users and groups exist');
|
|
83
83
|
}
|
|
84
84
|
const validUserNames = [];
|
|
85
|
-
const identifiers = args.options.
|
|
85
|
+
const identifiers = args.options.userNames ?? args.options.emails ?? args.options.aadGroupIds ?? args.options.aadGroupNames ?? args.options.userIds.toString();
|
|
86
86
|
await Promise.all(identifiers.split(',').map(async (identifier) => {
|
|
87
87
|
const trimmedIdentifier = identifier.trim();
|
|
88
88
|
try {
|
|
89
|
-
if (args.options.
|
|
89
|
+
if (args.options.userIds) {
|
|
90
90
|
if (this.verbose) {
|
|
91
91
|
await logger.logToStderr(`Getting AAD ID of user with ID ${trimmedIdentifier}`);
|
|
92
92
|
}
|
|
93
93
|
const spoUserAzureId = await spo.getUserAzureIdBySpoId(args.options.webUrl, trimmedIdentifier);
|
|
94
94
|
validUserNames.push(spoUserAzureId);
|
|
95
95
|
}
|
|
96
|
-
else if (args.options.
|
|
96
|
+
else if (args.options.userNames) {
|
|
97
97
|
validUserNames.push(trimmedIdentifier);
|
|
98
98
|
}
|
|
99
|
-
else if (args.options.
|
|
99
|
+
else if (args.options.aadGroupIds) {
|
|
100
100
|
validUserNames.push(trimmedIdentifier);
|
|
101
101
|
}
|
|
102
|
-
else if (args.options.
|
|
102
|
+
else if (args.options.aadGroupNames) {
|
|
103
103
|
if (this.verbose) {
|
|
104
104
|
await logger.logToStderr(`Getting ID of Azure AD group ${trimmedIdentifier}`);
|
|
105
105
|
}
|
|
@@ -132,11 +132,11 @@ _SpoGroupMemberAddCommand_instances = new WeakSet(), _SpoGroupMemberAddCommand_i
|
|
|
132
132
|
Object.assign(this.telemetryProperties, {
|
|
133
133
|
groupId: typeof args.options.groupId !== 'undefined',
|
|
134
134
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
userNames: typeof args.options.userNames !== 'undefined',
|
|
136
|
+
emails: typeof args.options.emails !== 'undefined',
|
|
137
|
+
userIds: typeof args.options.userIds !== 'undefined',
|
|
138
|
+
aadGroupIds: typeof args.options.aadGroupIds !== 'undefined',
|
|
139
|
+
aadGroupNames: typeof args.options.aadGroupNames !== 'undefined'
|
|
140
140
|
});
|
|
141
141
|
});
|
|
142
142
|
}, _SpoGroupMemberAddCommand_initOptions = function _SpoGroupMemberAddCommand_initOptions() {
|
|
@@ -147,15 +147,15 @@ _SpoGroupMemberAddCommand_instances = new WeakSet(), _SpoGroupMemberAddCommand_i
|
|
|
147
147
|
}, {
|
|
148
148
|
option: '--groupName [groupName]'
|
|
149
149
|
}, {
|
|
150
|
-
option: '--
|
|
150
|
+
option: '--userNames [userNames]'
|
|
151
151
|
}, {
|
|
152
|
-
option: '--
|
|
152
|
+
option: '--emails [emails]'
|
|
153
153
|
}, {
|
|
154
|
-
option: '--
|
|
154
|
+
option: '--userIds [userIds]'
|
|
155
155
|
}, {
|
|
156
|
-
option: '--
|
|
156
|
+
option: '--aadGroupIds [aadGroupIds]'
|
|
157
157
|
}, {
|
|
158
|
-
option: '--
|
|
158
|
+
option: '--aadGroupNames [aadGroupNames]'
|
|
159
159
|
});
|
|
160
160
|
}, _SpoGroupMemberAddCommand_initValidators = function _SpoGroupMemberAddCommand_initValidators() {
|
|
161
161
|
this.validators.push(async (args) => {
|
|
@@ -167,22 +167,22 @@ _SpoGroupMemberAddCommand_instances = new WeakSet(), _SpoGroupMemberAddCommand_i
|
|
|
167
167
|
return `Specified groupId ${args.options.groupId} is not a number`;
|
|
168
168
|
}
|
|
169
169
|
const userIdReg = new RegExp(/^[0-9,]*$/);
|
|
170
|
-
if (args.options.
|
|
171
|
-
return `${args.options.
|
|
170
|
+
if (args.options.userIds && !userIdReg.test(args.options.userIds)) {
|
|
171
|
+
return `${args.options.userIds} is not a number or a comma separated value`;
|
|
172
172
|
}
|
|
173
|
-
if (args.options.
|
|
174
|
-
return `${args.options.
|
|
173
|
+
if (args.options.userNames && args.options.userNames.split(',').some(e => !validation.isValidUserPrincipalName(e))) {
|
|
174
|
+
return `${args.options.userNames} contains one or more invalid usernames`;
|
|
175
175
|
}
|
|
176
|
-
if (args.options.
|
|
177
|
-
return `${args.options.
|
|
176
|
+
if (args.options.emails && args.options.emails.split(',').some(e => !validation.isValidUserPrincipalName(e))) {
|
|
177
|
+
return `${args.options.emails} contains one or more invalid email addresses`;
|
|
178
178
|
}
|
|
179
|
-
if (args.options.
|
|
180
|
-
return `${args.options.
|
|
179
|
+
if (args.options.aadGroupIds && args.options.aadGroupIds.split(',').some(e => !validation.isValidGuid(e))) {
|
|
180
|
+
return `${args.options.aadGroupIds} contains one or more invalid GUIDs`;
|
|
181
181
|
}
|
|
182
182
|
return true;
|
|
183
183
|
});
|
|
184
184
|
}, _SpoGroupMemberAddCommand_initOptionSets = function _SpoGroupMemberAddCommand_initOptionSets() {
|
|
185
|
-
this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['
|
|
185
|
+
this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['userNames', 'emails', 'userIds', 'aadGroupIds', 'aadGroupNames'] });
|
|
186
186
|
};
|
|
187
187
|
export default new SpoGroupMemberAddCommand();
|
|
188
188
|
//# sourceMappingURL=group-member-add.js.map
|
|
@@ -9,6 +9,8 @@ import { spo } from '../../../../utils/spo.js';
|
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
|
+
import { Cli } from '../../../../cli/Cli.js';
|
|
13
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
12
14
|
class SpoHubSiteConnectCommand extends SpoCommand {
|
|
13
15
|
get name() {
|
|
14
16
|
return commands.HUBSITE_CONNECT;
|
|
@@ -31,8 +33,8 @@ class SpoHubSiteConnectCommand extends SpoCommand {
|
|
|
31
33
|
try {
|
|
32
34
|
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
33
35
|
const hubSites = await this.getHubSites(spoAdminUrl);
|
|
34
|
-
const hubSite = this.getSpecificHubSite(hubSites, args.options.id, args.options.title, args.options.url);
|
|
35
|
-
const parentHubSite = this.getSpecificHubSite(hubSites, args.options.parentId, args.options.parentTitle, args.options.parentUrl);
|
|
36
|
+
const hubSite = await this.getSpecificHubSite(hubSites, args.options.id, args.options.title, args.options.url);
|
|
37
|
+
const parentHubSite = await this.getSpecificHubSite(hubSites, args.options.parentId, args.options.parentTitle, args.options.parentUrl);
|
|
36
38
|
const requestOptions = {
|
|
37
39
|
url: `${spoAdminUrl}/_api/HubSites/GetById('${hubSite.ID}')`,
|
|
38
40
|
headers: {
|
|
@@ -61,7 +63,7 @@ class SpoHubSiteConnectCommand extends SpoCommand {
|
|
|
61
63
|
const hubSites = await request.get(requestOptions);
|
|
62
64
|
return hubSites.value;
|
|
63
65
|
}
|
|
64
|
-
getSpecificHubSite(hubSites, id, title, url) {
|
|
66
|
+
async getSpecificHubSite(hubSites, id, title, url) {
|
|
65
67
|
let filteredHubSites = [];
|
|
66
68
|
if (id) {
|
|
67
69
|
filteredHubSites = hubSites.filter(site => site.ID.toLowerCase() === id.toLowerCase());
|
|
@@ -76,7 +78,8 @@ class SpoHubSiteConnectCommand extends SpoCommand {
|
|
|
76
78
|
throw `The specified hub site '${id || title || url}' does not exist.`;
|
|
77
79
|
}
|
|
78
80
|
if (filteredHubSites.length > 1) {
|
|
79
|
-
|
|
81
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('ID', filteredHubSites);
|
|
82
|
+
return await Cli.handleMultipleResultsFound(`Multiple hub sites with name '${title}' found.`, resultAsKeyValuePair);
|
|
80
83
|
}
|
|
81
84
|
return filteredHubSites[0];
|
|
82
85
|
}
|
|
@@ -6,6 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _SpoHubSiteDisconnectCommand_instances, _SpoHubSiteDisconnectCommand_initTelemetry, _SpoHubSiteDisconnectCommand_initOptions, _SpoHubSiteDisconnectCommand_initOptionSets, _SpoHubSiteDisconnectCommand_initValidators;
|
|
7
7
|
import { Cli } from '../../../../cli/Cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
9
10
|
import { spo } from '../../../../utils/spo.js';
|
|
10
11
|
import { validation } from '../../../../utils/validation.js';
|
|
11
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -91,7 +92,9 @@ class SpoHubSiteDisconnectCommand extends SpoCommand {
|
|
|
91
92
|
throw `The specified hub site '${options.title || options.url}' does not exist.`;
|
|
92
93
|
}
|
|
93
94
|
if (filteredHubSites.length > 1) {
|
|
94
|
-
|
|
95
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('ID', filteredHubSites);
|
|
96
|
+
const result = await Cli.handleMultipleResultsFound(`Multiple hub sites with name '${options.title}' found.`, resultAsKeyValuePair);
|
|
97
|
+
return result;
|
|
95
98
|
}
|
|
96
99
|
return filteredHubSites[0];
|
|
97
100
|
}
|
|
@@ -6,6 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _SpoHubSiteGetCommand_instances, _SpoHubSiteGetCommand_initTelemetry, _SpoHubSiteGetCommand_initOptions, _SpoHubSiteGetCommand_initValidators, _SpoHubSiteGetCommand_initOptionSets;
|
|
7
7
|
import { Cli } from '../../../../cli/Cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
9
10
|
import { spo } from '../../../../utils/spo.js';
|
|
10
11
|
import { validation } from '../../../../utils/validation.js';
|
|
11
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -87,7 +88,8 @@ class SpoHubSiteGetCommand extends SpoCommand {
|
|
|
87
88
|
throw `The specified hub site ${options.title || options.url} does not exist`;
|
|
88
89
|
}
|
|
89
90
|
if (hubSites.length > 1) {
|
|
90
|
-
|
|
91
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('ID', hubSites);
|
|
92
|
+
return await Cli.handleMultipleResultsFound(`Multiple hub sites with ${options.title || options.url} found.`, resultAsKeyValuePair);
|
|
91
93
|
}
|
|
92
94
|
return hubSites[0];
|
|
93
95
|
}
|
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoListAddCommand_instances, _SpoListAddCommand_initTelemetry, _SpoListAddCommand_initOptions, _SpoListAddCommand_initValidators, _SpoListAddCommand_initTypes;
|
|
6
|
+
var _SpoListAddCommand_instances, _a, _SpoListAddCommand_initTelemetry, _SpoListAddCommand_initOptions, _SpoListAddCommand_initValidators, _SpoListAddCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -275,7 +275,7 @@ class SpoListAddCommand extends SpoCommand {
|
|
|
275
275
|
return requestBody;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
_SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry = function _SpoListAddCommand_initTelemetry() {
|
|
278
|
+
_a = SpoListAddCommand, _SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry = function _SpoListAddCommand_initTelemetry() {
|
|
279
279
|
this.telemetry.push((args) => {
|
|
280
280
|
const telemetryProps = {};
|
|
281
281
|
// add properties with identifiable data
|
|
@@ -298,7 +298,7 @@ _SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry =
|
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
300
|
// add boolean values
|
|
301
|
-
|
|
301
|
+
_a.booleanOptions.forEach(o => {
|
|
302
302
|
const value = args.options[o];
|
|
303
303
|
if (value !== undefined) {
|
|
304
304
|
telemetryProps[o] = value.toString();
|
|
@@ -561,7 +561,7 @@ _SpoListAddCommand_instances = new WeakSet(), _SpoListAddCommand_initTelemetry =
|
|
|
561
561
|
});
|
|
562
562
|
}, _SpoListAddCommand_initTypes = function _SpoListAddCommand_initTypes() {
|
|
563
563
|
this.types.string.push('title', 'baseTemplate', 'webUrl', 'templateFeatureId', 'defaultContentApprovalWorkflowId', 'draftVersionVisibility', 'listExperienceOptions');
|
|
564
|
-
this.types.boolean.push(...
|
|
564
|
+
this.types.boolean.push(..._a.booleanOptions);
|
|
565
565
|
};
|
|
566
566
|
SpoListAddCommand.booleanOptions = [
|
|
567
567
|
'allowDeletion',
|
|
@@ -26,16 +26,6 @@ class SpoListRetentionLabelEnsureCommand extends SpoCommand {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListRetentionLabelEnsureCommand_instances, "m", _SpoListRetentionLabelEnsureCommand_initOptionSets).call(this);
|
|
27
27
|
}
|
|
28
28
|
async commandAction(logger, args) {
|
|
29
|
-
if (args.options.label) {
|
|
30
|
-
args.options.name = args.options.label;
|
|
31
|
-
this.warn(logger, `Option 'label' is deprecated. Please use 'name' instead`);
|
|
32
|
-
}
|
|
33
|
-
if (args.options.blockDelete) {
|
|
34
|
-
this.warn(logger, `Option 'blockDelete' is deprecated.`);
|
|
35
|
-
}
|
|
36
|
-
if (args.options.blockEdit) {
|
|
37
|
-
this.warn(logger, `Option 'blockEdit' is deprecated.`);
|
|
38
|
-
}
|
|
39
29
|
try {
|
|
40
30
|
let listRestUrl = '';
|
|
41
31
|
let listServerRelativeUrl = '';
|
|
@@ -70,8 +60,6 @@ class SpoListRetentionLabelEnsureCommand extends SpoCommand {
|
|
|
70
60
|
data: {
|
|
71
61
|
listUrl: listAbsoluteUrl,
|
|
72
62
|
complianceTagValue: args.options.name,
|
|
73
|
-
blockDelete: args.options.blockDelete || false,
|
|
74
|
-
blockEdit: args.options.blockEdit || false,
|
|
75
63
|
syncToItems: args.options.syncToItems || false
|
|
76
64
|
},
|
|
77
65
|
responseType: 'json'
|
|
@@ -86,23 +74,17 @@ class SpoListRetentionLabelEnsureCommand extends SpoCommand {
|
|
|
86
74
|
_SpoListRetentionLabelEnsureCommand_instances = new WeakSet(), _SpoListRetentionLabelEnsureCommand_initTelemetry = function _SpoListRetentionLabelEnsureCommand_initTelemetry() {
|
|
87
75
|
this.telemetry.push((args) => {
|
|
88
76
|
Object.assign(this.telemetryProperties, {
|
|
89
|
-
name: (!(!args.options.name)).toString(),
|
|
90
|
-
label: (!(!args.options.label)).toString(),
|
|
91
77
|
listId: (!(!args.options.listId)).toString(),
|
|
92
78
|
listTitle: (!(!args.options.listTitle)).toString(),
|
|
93
79
|
listUrl: (!(!args.options.listUrl)).toString(),
|
|
94
|
-
syncToItems: args.options.syncToItems || false
|
|
95
|
-
blockDelete: args.options.blockDelete || false,
|
|
96
|
-
blockEdit: args.options.blockEdit || false
|
|
80
|
+
syncToItems: args.options.syncToItems || false
|
|
97
81
|
});
|
|
98
82
|
});
|
|
99
83
|
}, _SpoListRetentionLabelEnsureCommand_initOptions = function _SpoListRetentionLabelEnsureCommand_initOptions() {
|
|
100
84
|
this.options.unshift({
|
|
101
85
|
option: '-u, --webUrl <webUrl>'
|
|
102
86
|
}, {
|
|
103
|
-
option: '--name
|
|
104
|
-
}, {
|
|
105
|
-
option: '--label [label]'
|
|
87
|
+
option: '--name <name>'
|
|
106
88
|
}, {
|
|
107
89
|
option: '-t, --listTitle [listTitle]'
|
|
108
90
|
}, {
|
|
@@ -111,10 +93,6 @@ _SpoListRetentionLabelEnsureCommand_instances = new WeakSet(), _SpoListRetention
|
|
|
111
93
|
option: '--listUrl [listUrl]'
|
|
112
94
|
}, {
|
|
113
95
|
option: '--syncToItems'
|
|
114
|
-
}, {
|
|
115
|
-
option: '--blockDelete'
|
|
116
|
-
}, {
|
|
117
|
-
option: '--blockEdit'
|
|
118
96
|
});
|
|
119
97
|
}, _SpoListRetentionLabelEnsureCommand_initValidators = function _SpoListRetentionLabelEnsureCommand_initValidators() {
|
|
120
98
|
this.validators.push(async (args) => {
|
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoListSetCommand_instances, _SpoListSetCommand_initTelemetry, _SpoListSetCommand_initOptions, _SpoListSetCommand_initValidators, _SpoListSetCommand_initTypes, _SpoListSetCommand_initOptionSets;
|
|
6
|
+
var _SpoListSetCommand_instances, _a, _SpoListSetCommand_initTelemetry, _SpoListSetCommand_initOptions, _SpoListSetCommand_initValidators, _SpoListSetCommand_initTypes, _SpoListSetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -277,7 +277,7 @@ class SpoListSetCommand extends SpoCommand {
|
|
|
277
277
|
return requestBody;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
_SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry = function _SpoListSetCommand_initTelemetry() {
|
|
280
|
+
_a = SpoListSetCommand, _SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry = function _SpoListSetCommand_initTelemetry() {
|
|
281
281
|
this.telemetry.push((args) => {
|
|
282
282
|
const telemetryProps = {};
|
|
283
283
|
// add properties with identifiable data
|
|
@@ -303,7 +303,7 @@ _SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry =
|
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
// add boolean values
|
|
306
|
-
|
|
306
|
+
_a.booleanOptions.forEach(o => {
|
|
307
307
|
const value = args.options[o];
|
|
308
308
|
if (value !== undefined) {
|
|
309
309
|
telemetryProps[o] = value;
|
|
@@ -565,7 +565,7 @@ _SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry =
|
|
|
565
565
|
});
|
|
566
566
|
}, _SpoListSetCommand_initTypes = function _SpoListSetCommand_initTypes() {
|
|
567
567
|
this.types.string.push('webUrl', 'templateFeatureId', 'defaultContentApprovalWorkflowId', 'draftVersionVisibility', 'listExperienceOptions');
|
|
568
|
-
this.types.boolean.push(...
|
|
568
|
+
this.types.boolean.push(..._a.booleanOptions);
|
|
569
569
|
}, _SpoListSetCommand_initOptionSets = function _SpoListSetCommand_initOptionSets() {
|
|
570
570
|
this.optionSets.push({ options: ['id', 'title', 'url'] });
|
|
571
571
|
};
|
|
@@ -188,8 +188,9 @@ class SpoListItemSetCommand extends SpoCommand {
|
|
|
188
188
|
},
|
|
189
189
|
responseType: 'json'
|
|
190
190
|
};
|
|
191
|
-
const
|
|
192
|
-
|
|
191
|
+
const item = await request.get(requestOptionsItems);
|
|
192
|
+
delete item.ID;
|
|
193
|
+
await logger.log(item);
|
|
193
194
|
}
|
|
194
195
|
catch (err) {
|
|
195
196
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -119,8 +119,8 @@ _SpoNavigationNodeSetCommand_instances = new WeakSet(), _SpoNavigationNodeSetCom
|
|
|
119
119
|
if (isValidSharePointUrl !== true) {
|
|
120
120
|
return isValidSharePointUrl;
|
|
121
121
|
}
|
|
122
|
-
if (args.options.audienceIds === undefined &&
|
|
123
|
-
return `Please specify
|
|
122
|
+
if (args.options.audienceIds === undefined && args.options.url === undefined && args.options.isExternal === undefined && !args.options.title && args.options.openInNewWindow === undefined) {
|
|
123
|
+
return `Please specify at least one property to update.`;
|
|
124
124
|
}
|
|
125
125
|
if (args.options.audienceIds) {
|
|
126
126
|
const audienceIdsSplitted = args.options.audienceIds.split(',');
|
|
@@ -3,13 +3,19 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoOrgAssetsLibraryAddCommand_instances, _SpoOrgAssetsLibraryAddCommand_initTelemetry, _SpoOrgAssetsLibraryAddCommand_initOptions, _SpoOrgAssetsLibraryAddCommand_initValidators;
|
|
6
|
+
var _SpoOrgAssetsLibraryAddCommand_instances, _a, _SpoOrgAssetsLibraryAddCommand_initTelemetry, _SpoOrgAssetsLibraryAddCommand_initOptions, _SpoOrgAssetsLibraryAddCommand_initValidators;
|
|
7
7
|
import config from '../../../../config.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { spo } from '../../../../utils/spo.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
|
+
var OrgAssetType;
|
|
14
|
+
(function (OrgAssetType) {
|
|
15
|
+
OrgAssetType[OrgAssetType["ImageDocumentLibrary"] = 1] = "ImageDocumentLibrary";
|
|
16
|
+
OrgAssetType[OrgAssetType["OfficeTemplateLibrary"] = 2] = "OfficeTemplateLibrary";
|
|
17
|
+
OrgAssetType[OrgAssetType["OfficeFontLibrary"] = 4] = "OfficeFontLibrary";
|
|
18
|
+
})(OrgAssetType || (OrgAssetType = {}));
|
|
13
19
|
class SpoOrgAssetsLibraryAddCommand extends SpoCommand {
|
|
14
20
|
get name() {
|
|
15
21
|
return commands.ORGASSETSLIBRARY_ADD;
|
|
@@ -30,6 +36,7 @@ class SpoOrgAssetsLibraryAddCommand extends SpoCommand {
|
|
|
30
36
|
const cdnType = cdnTypeString === 'Private' ? 1 : 0;
|
|
31
37
|
const thumbnailSchema = typeof args.options.thumbnailUrl === 'undefined' ? `<Parameter Type="Null" />` : `<Parameter Type="String">${args.options.thumbnailUrl}</Parameter>`;
|
|
32
38
|
try {
|
|
39
|
+
const orgAssetType = this.getOrgAssetType(args.options.orgAssetType);
|
|
33
40
|
spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
34
41
|
const reqDigest = await spo.getRequestDigest(spoAdminUrl);
|
|
35
42
|
const requestOptions = {
|
|
@@ -37,7 +44,7 @@ class SpoOrgAssetsLibraryAddCommand extends SpoCommand {
|
|
|
37
44
|
headers: {
|
|
38
45
|
'X-RequestDigest': reqDigest.FormDigestValue
|
|
39
46
|
},
|
|
40
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="AddToOrgAssetsLibAndCdnWithType" Id="11" ObjectPathId="8"><Parameters><Parameter Type="Enum">${cdnType}</Parameter><Parameter Type="String">${args.options.libraryUrl}</Parameter>${thumbnailSchema}<Parameter Type="Enum"
|
|
47
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="AddToOrgAssetsLibAndCdnWithType" Id="11" ObjectPathId="8"><Parameters><Parameter Type="Enum">${cdnType}</Parameter><Parameter Type="String">${args.options.libraryUrl}</Parameter>${thumbnailSchema}<Parameter Type="Enum">${orgAssetType}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="8" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
41
48
|
};
|
|
42
49
|
const res = await request.post(requestOptions);
|
|
43
50
|
const json = JSON.parse(res);
|
|
@@ -50,12 +57,23 @@ class SpoOrgAssetsLibraryAddCommand extends SpoCommand {
|
|
|
50
57
|
this.handleRejectedPromise(err);
|
|
51
58
|
}
|
|
52
59
|
}
|
|
60
|
+
getOrgAssetType(orgAssetType) {
|
|
61
|
+
switch (orgAssetType) {
|
|
62
|
+
case 'OfficeTemplateLibrary':
|
|
63
|
+
return OrgAssetType.OfficeTemplateLibrary;
|
|
64
|
+
case 'OfficeFontLibrary':
|
|
65
|
+
return OrgAssetType.OfficeFontLibrary;
|
|
66
|
+
default:
|
|
67
|
+
return OrgAssetType.ImageDocumentLibrary;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
53
70
|
}
|
|
54
|
-
_SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAddCommand_initTelemetry = function _SpoOrgAssetsLibraryAddCommand_initTelemetry() {
|
|
71
|
+
_a = SpoOrgAssetsLibraryAddCommand, _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAddCommand_initTelemetry = function _SpoOrgAssetsLibraryAddCommand_initTelemetry() {
|
|
55
72
|
this.telemetry.push((args) => {
|
|
56
73
|
Object.assign(this.telemetryProperties, {
|
|
57
74
|
cdnType: args.options.cdnType || 'Private',
|
|
58
|
-
thumbnailUrl: typeof args.options.thumbnailUrl !== 'undefined'
|
|
75
|
+
thumbnailUrl: typeof args.options.thumbnailUrl !== 'undefined',
|
|
76
|
+
orgAssetType: args.options.orgAssetType
|
|
59
77
|
});
|
|
60
78
|
});
|
|
61
79
|
}, _SpoOrgAssetsLibraryAddCommand_initOptions = function _SpoOrgAssetsLibraryAddCommand_initOptions() {
|
|
@@ -65,7 +83,10 @@ _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAd
|
|
|
65
83
|
option: '--thumbnailUrl [thumbnailUrl]'
|
|
66
84
|
}, {
|
|
67
85
|
option: '--cdnType [cdnType]',
|
|
68
|
-
autocomplete:
|
|
86
|
+
autocomplete: _a.cdnTypes
|
|
87
|
+
}, {
|
|
88
|
+
option: '--orgAssetType [orgAssetType]',
|
|
89
|
+
autocomplete: _a.orgAssetTypes
|
|
69
90
|
});
|
|
70
91
|
}, _SpoOrgAssetsLibraryAddCommand_initValidators = function _SpoOrgAssetsLibraryAddCommand_initValidators() {
|
|
71
92
|
this.validators.push(async (args) => {
|
|
@@ -73,8 +94,16 @@ _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAd
|
|
|
73
94
|
if (typeof args.options.thumbnailUrl !== 'undefined' && isValidThumbnailUrl !== true) {
|
|
74
95
|
return isValidThumbnailUrl;
|
|
75
96
|
}
|
|
97
|
+
if (args.options.cdnType && _a.cdnTypes.indexOf(args.options.cdnType) < 0) {
|
|
98
|
+
return `${args.options.cdnType} is not a valid value for cdnType. Valid values are ${_a.cdnTypes.join(', ')}`;
|
|
99
|
+
}
|
|
100
|
+
if (args.options.orgAssetType && _a.orgAssetTypes.indexOf(args.options.orgAssetType) < 0) {
|
|
101
|
+
return `${args.options.orgAssetType} is not a valid value for orgAssetType. Valid values are ${_a.orgAssetTypes.join(', ')}`;
|
|
102
|
+
}
|
|
76
103
|
return validation.isValidSharePointUrl(args.options.libraryUrl);
|
|
77
104
|
});
|
|
78
105
|
};
|
|
106
|
+
SpoOrgAssetsLibraryAddCommand.orgAssetTypes = ['ImageDocumentLibrary', 'OfficeTemplateLibrary', 'OfficeFontLibrary'];
|
|
107
|
+
SpoOrgAssetsLibraryAddCommand.cdnTypes = ['Public', 'Private'];
|
|
79
108
|
export default new SpoOrgAssetsLibraryAddCommand();
|
|
80
109
|
//# sourceMappingURL=orgassetslibrary-add.js.map
|
|
@@ -26,7 +26,25 @@ export var CanvasSectionTemplate;
|
|
|
26
26
|
/// Two columns, left one is 1/3, right one 2/3
|
|
27
27
|
/// </summary>
|
|
28
28
|
CanvasSectionTemplate[CanvasSectionTemplate["TwoColumnRight"] = 5] = "TwoColumnRight";
|
|
29
|
+
/// <summary>
|
|
30
|
+
/// Vertical
|
|
31
|
+
/// </summary>
|
|
32
|
+
CanvasSectionTemplate[CanvasSectionTemplate["Vertical"] = 6] = "Vertical";
|
|
29
33
|
})(CanvasSectionTemplate || (CanvasSectionTemplate = {}));
|
|
34
|
+
/**
|
|
35
|
+
* Section background shading
|
|
36
|
+
* 0 - None
|
|
37
|
+
* 1 - Neutral
|
|
38
|
+
* 2 - Soft
|
|
39
|
+
* 3 - Strong
|
|
40
|
+
*/
|
|
41
|
+
export var ZoneEmphasis;
|
|
42
|
+
(function (ZoneEmphasis) {
|
|
43
|
+
ZoneEmphasis[ZoneEmphasis["None"] = 0] = "None";
|
|
44
|
+
ZoneEmphasis[ZoneEmphasis["Neutral"] = 1] = "Neutral";
|
|
45
|
+
ZoneEmphasis[ZoneEmphasis["Soft"] = 2] = "Soft";
|
|
46
|
+
ZoneEmphasis[ZoneEmphasis["Strong"] = 3] = "Strong";
|
|
47
|
+
})(ZoneEmphasis || (ZoneEmphasis = {}));
|
|
30
48
|
/**
|
|
31
49
|
* Shorthand for Object.hasOwnProperty
|
|
32
50
|
*
|
|
@@ -204,7 +222,6 @@ function reindex(collection) {
|
|
|
204
222
|
export class ClientSidePage {
|
|
205
223
|
constructor() {
|
|
206
224
|
this.sections = [];
|
|
207
|
-
this.commentsDisabled = false;
|
|
208
225
|
}
|
|
209
226
|
/**
|
|
210
227
|
* Converts a json object to an escaped string appropriate for use in attributes when storing client-side controls
|
|
@@ -243,49 +260,6 @@ export class ClientSidePage {
|
|
|
243
260
|
};
|
|
244
261
|
return JSON.parse(unespace(escapedString));
|
|
245
262
|
}
|
|
246
|
-
/**
|
|
247
|
-
* Add a section to this page
|
|
248
|
-
*/
|
|
249
|
-
addSection(sectionTemplate, order) {
|
|
250
|
-
var sectionOrder = typeof order !== 'undefined' ? order : getNextOrder(this.sections);
|
|
251
|
-
var section = new CanvasSection(this, sectionOrder);
|
|
252
|
-
if (sectionTemplate) {
|
|
253
|
-
switch (CanvasSectionTemplate[sectionTemplate].toString()) {
|
|
254
|
-
case CanvasSectionTemplate.OneColumnFullWidth.toString():
|
|
255
|
-
section.addColumn(0);
|
|
256
|
-
break;
|
|
257
|
-
case CanvasSectionTemplate.TwoColumn.toString():
|
|
258
|
-
section.addColumn(6);
|
|
259
|
-
section.addColumn(6);
|
|
260
|
-
break;
|
|
261
|
-
case CanvasSectionTemplate.ThreeColumn.toString():
|
|
262
|
-
section.addColumn(4);
|
|
263
|
-
section.addColumn(4);
|
|
264
|
-
section.addColumn(4);
|
|
265
|
-
break;
|
|
266
|
-
case CanvasSectionTemplate.TwoColumnLeft.toString():
|
|
267
|
-
section.addColumn(8);
|
|
268
|
-
section.addColumn(4);
|
|
269
|
-
break;
|
|
270
|
-
case CanvasSectionTemplate.TwoColumnRight.toString():
|
|
271
|
-
section.addColumn(4);
|
|
272
|
-
section.addColumn(8);
|
|
273
|
-
break;
|
|
274
|
-
case CanvasSectionTemplate.OneColumn.toString():
|
|
275
|
-
default:
|
|
276
|
-
section.addColumn(12);
|
|
277
|
-
break;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
if (typeof order !== undefined) {
|
|
281
|
-
// Insert the sections at the specified order.
|
|
282
|
-
this.sections.splice(sectionOrder - 1, 0, section);
|
|
283
|
-
}
|
|
284
|
-
else {
|
|
285
|
-
this.sections.push(section);
|
|
286
|
-
}
|
|
287
|
-
return section;
|
|
288
|
-
}
|
|
289
263
|
/**
|
|
290
264
|
* Converts this page's content to html markup
|
|
291
265
|
*/
|
|
@@ -341,14 +315,6 @@ export class ClientSidePage {
|
|
|
341
315
|
reindex(page.sections);
|
|
342
316
|
return page;
|
|
343
317
|
}
|
|
344
|
-
/**
|
|
345
|
-
* Finds a control by the specified instance id
|
|
346
|
-
*
|
|
347
|
-
* @param id Instance id of the control to find
|
|
348
|
-
*/
|
|
349
|
-
findControlById(id) {
|
|
350
|
-
return this.findControl((c) => c.id === id);
|
|
351
|
-
}
|
|
352
318
|
/**
|
|
353
319
|
* Finds a control within this page's control tree using the supplied predicate
|
|
354
320
|
*
|
|
@@ -441,7 +407,6 @@ export class CanvasSection {
|
|
|
441
407
|
this.page = page;
|
|
442
408
|
this.order = order;
|
|
443
409
|
this.columns = columns;
|
|
444
|
-
this._memId = getGUID();
|
|
445
410
|
}
|
|
446
411
|
/**
|
|
447
412
|
* Default column (this.columns[0]) for this section
|
|
@@ -460,15 +425,6 @@ export class CanvasSection {
|
|
|
460
425
|
this.columns.push(column);
|
|
461
426
|
return column;
|
|
462
427
|
}
|
|
463
|
-
/**
|
|
464
|
-
* Adds a control to the default column for this section
|
|
465
|
-
*
|
|
466
|
-
* @param control Control to add to the default column
|
|
467
|
-
*/
|
|
468
|
-
addControl(control) {
|
|
469
|
-
this.defaultColumn.addControl(control);
|
|
470
|
-
return this;
|
|
471
|
-
}
|
|
472
428
|
toHtml() {
|
|
473
429
|
const html = [];
|
|
474
430
|
for (let i = 0; i < this.columns.length; i++) {
|
|
@@ -476,15 +432,8 @@ export class CanvasSection {
|
|
|
476
432
|
}
|
|
477
433
|
return html.join("");
|
|
478
434
|
}
|
|
479
|
-
/**
|
|
480
|
-
* Removes this section and all contained columns and controls from the collection
|
|
481
|
-
*/
|
|
482
|
-
remove() {
|
|
483
|
-
this.page.sections = this.page.sections.filter(section => section._memId !== this._memId);
|
|
484
|
-
reindex(this.page.sections);
|
|
485
|
-
}
|
|
486
435
|
}
|
|
487
|
-
|
|
436
|
+
class CanvasControl {
|
|
488
437
|
constructor(controlType, dataVersion, column = undefined, order = 1, id = getGUID(), controlData = null, dynamicDataPaths = null, dynamicDataValues = null) {
|
|
489
438
|
this.controlType = controlType;
|
|
490
439
|
this.dataVersion = dataVersion;
|
|
@@ -534,9 +483,6 @@ export class CanvasColumn extends CanvasControl {
|
|
|
534
483
|
}
|
|
535
484
|
return this;
|
|
536
485
|
}
|
|
537
|
-
getControl(index) {
|
|
538
|
-
return this.controls[index];
|
|
539
|
-
}
|
|
540
486
|
toHtml() {
|
|
541
487
|
const html = [];
|
|
542
488
|
if (this.controls.length < 1) {
|
|
@@ -662,11 +608,6 @@ export class ClientSideWebpart extends ClientSidePart {
|
|
|
662
608
|
this.dynamicDataPaths = dynamicDataPaths;
|
|
663
609
|
this.dynamicDataValues = dynamicDataValues;
|
|
664
610
|
}
|
|
665
|
-
static fromComponentDef(definition) {
|
|
666
|
-
const part = new ClientSideWebpart("");
|
|
667
|
-
part.import(definition);
|
|
668
|
-
return part;
|
|
669
|
-
}
|
|
670
611
|
import(component) {
|
|
671
612
|
this.webPartId = component.Id.replace(/^\{|\}$/g, "").toLowerCase();
|
|
672
613
|
const manifest = JSON.parse(component.Manifest);
|
|
@@ -679,9 +620,6 @@ export class ClientSideWebpart extends ClientSidePart {
|
|
|
679
620
|
this.propertieJson = extend(this.propertieJson, properties);
|
|
680
621
|
return this;
|
|
681
622
|
}
|
|
682
|
-
getProperties() {
|
|
683
|
-
return this.propertieJson;
|
|
684
|
-
}
|
|
685
623
|
toHtml(index) {
|
|
686
624
|
// set our order to the value passed in
|
|
687
625
|
this.order = index;
|
|
@@ -34,9 +34,9 @@ class SpoPageListCommand extends SpoCommand {
|
|
|
34
34
|
if (pagesList && pagesList.length > 0) {
|
|
35
35
|
pages = pagesList;
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
const clientSidePages =
|
|
37
|
+
const files = await odata.getAllItems(`${args.options.webUrl}/_api/web/lists/SitePages/rootfolder/files?$expand=ListItemAllFields/ClientSideApplicationId&$orderby=Name`);
|
|
38
|
+
if (files?.length > 0) {
|
|
39
|
+
const clientSidePages = files.filter(f => f.ListItemAllFields.ClientSideApplicationId === 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec');
|
|
40
40
|
pages = pages.map(p => {
|
|
41
41
|
const clientSidePage = clientSidePages.find(cp => cp && cp.ListItemAllFields && cp.ListItemAllFields.Id === p.Id);
|
|
42
42
|
if (clientSidePage) {
|
|
@@ -47,6 +47,7 @@ class SpoPageListCommand extends SpoCommand {
|
|
|
47
47
|
}
|
|
48
48
|
return p;
|
|
49
49
|
});
|
|
50
|
+
pages.filter(p => p.ListItemAllFields).forEach(page => delete page.ListItemAllFields.ID);
|
|
50
51
|
await logger.log(pages);
|
|
51
52
|
}
|
|
52
53
|
}
|