@pnp/cli-microsoft365 5.8.0-beta.f956c5d → 6.0.0-beta.0b0fb88
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/dist/Auth.js +1 -2
- package/dist/m365/aad/commands/app/app-add.js +4 -4
- package/dist/m365/aad/commands/app/app-remove.js +0 -4
- package/dist/m365/aad/commands/app/app-role-remove.js +0 -4
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +11 -11
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +10 -10
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +10 -10
- package/dist/m365/aad/commands/o365group/o365group-add.js +2 -7
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +6 -6
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +0 -3
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +9 -9
- package/dist/m365/aad/commands/policy/policy-list.js +6 -6
- package/dist/m365/aad/commands/sp/sp-get.js +12 -12
- package/dist/m365/aad/commands.js +0 -3
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- package/dist/m365/flow/commands/flow-disable.js +2 -2
- package/dist/m365/flow/commands/flow-enable.js +2 -2
- package/dist/m365/flow/commands/flow-export.js +5 -5
- package/dist/m365/flow/commands/flow-get.js +2 -2
- package/dist/m365/flow/commands/flow-list.js +2 -2
- package/dist/m365/flow/commands/flow-remove.js +3 -3
- package/dist/m365/flow/commands/run/run-cancel.js +6 -6
- package/dist/m365/flow/commands/run/run-get.js +4 -4
- package/dist/m365/flow/commands/run/run-list.js +4 -4
- package/dist/m365/flow/commands/run/run-resubmit.js +7 -7
- package/dist/m365/outlook/commands/mail/mail-send.js +0 -3
- package/dist/m365/outlook/commands/message/message-move.js +2 -2
- package/dist/m365/outlook/commands.js +1 -2
- package/dist/m365/pa/commands/connector/connector-export.js +3 -3
- package/dist/m365/pa/commands/connector/connector-list.js +2 -2
- package/dist/m365/pa/commands/solution/solution-reference-add.js +7 -7
- package/dist/m365/planner/commands/bucket/bucket-add.js +2 -9
- package/dist/m365/planner/commands/bucket/bucket-get.js +4 -11
- package/dist/m365/planner/commands/bucket/bucket-list.js +2 -9
- package/dist/m365/planner/commands/bucket/bucket-remove.js +4 -11
- package/dist/m365/planner/commands/bucket/bucket-set.js +4 -11
- package/dist/m365/planner/commands/plan/plan-get.js +0 -4
- package/dist/m365/planner/commands/task/task-add.js +3 -8
- package/dist/m365/planner/commands/task/task-get.js +5 -19
- package/dist/m365/planner/commands/task/task-list.js +4 -11
- package/dist/m365/planner/commands/task/task-set.js +5 -10
- package/dist/m365/planner/commands.js +0 -2
- package/dist/m365/spfx/commands/package/package-generate.js +2 -2
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +1 -1
- package/dist/m365/spo/commands/app/app-add.js +7 -7
- package/dist/m365/spo/commands/app/app-deploy.js +7 -7
- package/dist/m365/spo/commands/app/app-get.js +7 -7
- package/dist/m365/spo/commands/app/app-install.js +6 -6
- package/dist/m365/spo/commands/app/app-list.js +7 -7
- package/dist/m365/spo/commands/app/app-remove.js +7 -7
- package/dist/m365/spo/commands/app/app-retract.js +7 -7
- package/dist/m365/spo/commands/app/app-uninstall.js +6 -6
- package/dist/m365/spo/commands/app/app-upgrade.js +6 -6
- package/dist/m365/spo/commands/apppage/apppage-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +7 -7
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +7 -7
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +13 -13
- package/dist/m365/spo/commands/customaction/customaction-add.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-clear.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-get.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-list.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-remove.js +6 -5
- package/dist/m365/spo/commands/customaction/customaction-set.js +3 -3
- package/dist/m365/spo/commands/feature/feature-disable.js +4 -4
- package/dist/m365/spo/commands/feature/feature-enable.js +5 -5
- package/dist/m365/spo/commands/feature/feature-list.js +3 -3
- package/dist/m365/spo/commands/field/field-get.js +1 -7
- package/dist/m365/spo/commands/field/field-remove.js +1 -7
- package/dist/m365/spo/commands/field/field-set.js +2 -9
- package/dist/m365/spo/commands/file/file-checkin.js +5 -5
- package/dist/m365/spo/commands/file/file-checkout.js +5 -5
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +13 -13
- package/dist/m365/spo/commands/folder/folder-get.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +3 -3
- package/dist/m365/spo/commands/folder/folder-rename.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +7 -7
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +6 -6
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-add.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +6 -6
- package/dist/m365/spo/commands/list/list-list.js +3 -13
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +46 -21
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +42 -17
- package/dist/m365/spo/commands/list/list-view-field-add.js +20 -20
- package/dist/m365/spo/commands/list/list-view-field-remove.js +11 -11
- package/dist/m365/spo/commands/list/list-view-field-set.js +15 -15
- package/dist/m365/spo/commands/list/list-view-get.js +9 -9
- package/dist/m365/spo/commands/list/list-view-remove.js +11 -11
- package/dist/m365/spo/commands/list/list-view-set.js +11 -11
- package/dist/m365/spo/commands/listitem/listitem-list.js +6 -25
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +46 -21
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +45 -17
- package/dist/m365/spo/commands/page/page-column-get.js +2 -2
- package/dist/m365/spo/commands/page/page-column-list.js +2 -2
- package/dist/m365/spo/commands/page/page-control-get.js +4 -4
- package/dist/m365/spo/commands/page/page-control-list.js +3 -3
- package/dist/m365/spo/commands/page/page-control-set.js +3 -3
- package/dist/m365/spo/commands/page/page-section-add.js +2 -2
- package/dist/m365/spo/commands/page/page-section-get.js +2 -2
- package/dist/m365/spo/commands/page/page-section-list.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +4 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +4 -4
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +3 -3
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +3 -3
- package/dist/m365/spo/commands/site/site-apppermission-get.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +5 -5
- package/dist/m365/spo/commands/site/site-apppermission-set.js +5 -5
- package/dist/m365/spo/commands/site/site-chrome-set.js +3 -3
- package/dist/m365/spo/commands/site/site-ensure.js +1 -1
- package/dist/m365/spo/commands/site/site-groupify.js +3 -3
- package/dist/m365/spo/commands/site/site-list.js +6 -17
- package/dist/m365/spo/commands/site/site-rename.js +9 -9
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +3 -3
- package/dist/m365/spo/commands/web/web-add.js +5 -5
- package/dist/m365/spo/commands/web/web-get.js +3 -3
- package/dist/m365/spo/commands/web/web-list.js +4 -4
- package/dist/m365/spo/commands/web/web-reindex.js +8 -8
- package/dist/m365/spo/commands/web/web-remove.js +5 -5
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +43 -13
- package/dist/m365/spo/commands/web/web-set.js +4 -4
- package/dist/m365/spo/commands.js +0 -3
- package/dist/m365/teams/commands/app/app-install.js +4 -4
- package/dist/m365/teams/commands/app/app-uninstall.js +3 -3
- package/dist/m365/teams/commands/channel/channel-get.js +10 -10
- package/dist/m365/teams/commands/channel/channel-member-add.js +0 -4
- package/dist/m365/teams/commands/channel/channel-member-list.js +0 -4
- package/dist/m365/teams/commands/channel/channel-member-remove.js +0 -4
- package/dist/m365/teams/commands/channel/channel-remove.js +12 -12
- package/dist/m365/teams/commands/channel/channel-set.js +7 -7
- package/dist/m365/teams/commands/message/message-get.js +3 -3
- package/dist/m365/teams/commands/tab/tab-get.js +10 -10
- package/dist/m365/teams/commands/tab/tab-remove.js +6 -6
- package/dist/m365/teams/commands/team/team-archive.js +3 -13
- package/dist/m365/teams/commands/team/team-clone.js +3 -20
- package/dist/m365/teams/commands/team/team-remove.js +5 -17
- package/dist/m365/teams/commands/team/team-set.js +1 -13
- package/dist/m365/teams/commands/team/team-unarchive.js +4 -16
- package/dist/m365/teams/commands/user/user-app-add.js +4 -4
- package/dist/m365/teams/commands/user/user-app-remove.js +3 -3
- package/dist/m365/teams/commands.js +0 -3
- package/dist/m365/viva/commands/connections/connections-app-create.js +9 -9
- package/dist/m365/yammer/commands/group/group-user-add.js +8 -8
- package/dist/m365/yammer/commands/group/group-user-remove.js +11 -11
- package/dist/m365/yammer/commands/message/message-like-set.js +5 -5
- package/dist/m365/yammer/commands/user/user-get.js +5 -5
- package/dist/settingsNames.js +0 -1
- package/docs/docs/cmd/aad/app/app-remove.md +0 -6
- package/docs/docs/cmd/aad/app/app-role-remove.md +0 -6
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.md +5 -5
- package/docs/docs/cmd/aad/o365group/o365group-add.md +3 -3
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-list.md +7 -7
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-restore.md +1 -7
- package/docs/docs/cmd/aad/o365group/o365group-teamify.md +4 -4
- package/docs/docs/cmd/aad/policy/policy-list.md +2 -2
- package/docs/docs/cmd/aad/sp/sp-get.md +5 -5
- package/docs/docs/cmd/flow/flow-disable.md +3 -3
- package/docs/docs/cmd/flow/flow-enable.md +1 -1
- package/docs/docs/cmd/flow/flow-export.md +5 -5
- package/docs/docs/cmd/flow/flow-get.md +3 -3
- package/docs/docs/cmd/flow/flow-list.md +3 -3
- package/docs/docs/cmd/flow/flow-remove.md +5 -5
- package/docs/docs/cmd/flow/run/run-cancel.md +3 -3
- package/docs/docs/cmd/flow/run/run-get.md +3 -3
- package/docs/docs/cmd/flow/run/run-list.md +3 -3
- package/docs/docs/cmd/flow/run/run-resubmit.md +4 -4
- package/docs/docs/cmd/outlook/mail/mail-send.md +1 -7
- package/docs/docs/cmd/outlook/message/message-move.md +4 -4
- package/docs/docs/cmd/pa/connector/connector-export.md +3 -3
- package/docs/docs/cmd/pa/connector/connector-list.md +2 -2
- package/docs/docs/cmd/pa/solution/solution-reference-add.md +2 -2
- package/docs/docs/cmd/planner/bucket/bucket-add.md +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-get.md +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-list.md +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-remove.md +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-set.md +0 -3
- package/docs/docs/cmd/planner/plan/plan-get.md +0 -6
- package/docs/docs/cmd/planner/task/task-add.md +0 -3
- package/docs/docs/cmd/planner/task/task-get.md +0 -3
- package/docs/docs/cmd/planner/task/task-list.md +0 -3
- package/docs/docs/cmd/planner/task/task-set.md +0 -3
- package/docs/docs/cmd/spfx/package/package-generate.md +2 -2
- package/docs/docs/cmd/spo/app/app-add.md +2 -2
- package/docs/docs/cmd/spo/app/app-deploy.md +2 -2
- package/docs/docs/cmd/spo/app/app-get.md +2 -2
- package/docs/docs/cmd/spo/app/app-install.md +2 -2
- package/docs/docs/cmd/spo/app/app-list.md +2 -2
- package/docs/docs/cmd/spo/app/app-remove.md +2 -2
- package/docs/docs/cmd/spo/app/app-retract.md +2 -2
- package/docs/docs/cmd/spo/app/app-uninstall.md +2 -2
- package/docs/docs/cmd/spo/app/app-upgrade.md +2 -2
- package/docs/docs/cmd/spo/apppage/apppage-set.md +2 -2
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.md +3 -3
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-add.md +10 -10
- package/docs/docs/cmd/spo/customaction/customaction-clear.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-get.md +5 -5
- package/docs/docs/cmd/spo/customaction/customaction-list.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-remove.md +9 -9
- package/docs/docs/cmd/spo/customaction/customaction-set.md +7 -7
- package/docs/docs/cmd/spo/feature/feature-disable.md +4 -4
- package/docs/docs/cmd/spo/feature/feature-enable.md +2 -2
- package/docs/docs/cmd/spo/feature/feature-list.md +3 -3
- package/docs/docs/cmd/spo/field/field-get.md +0 -3
- package/docs/docs/cmd/spo/field/field-remove.md +0 -3
- package/docs/docs/cmd/spo/field/field-set.md +0 -3
- package/docs/docs/cmd/spo/file/file-checkin.md +6 -6
- package/docs/docs/cmd/spo/file/file-checkout.md +4 -4
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +7 -7
- package/docs/docs/cmd/spo/folder/folder-get.md +2 -2
- package/docs/docs/cmd/spo/folder/folder-remove.md +3 -3
- package/docs/docs/cmd/spo/folder/folder-rename.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.md +2 -2
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +3 -3
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +3 -3
- package/docs/docs/cmd/spo/list/list-list.md +0 -3
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +9 -0
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +9 -0
- package/docs/docs/cmd/spo/list/list-view-field-add.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-field-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-view-field-set.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-get.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-remove.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-set.md +7 -7
- package/docs/docs/cmd/spo/listitem/listitem-list.md +0 -6
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +5 -5
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +3 -3
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +9 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.md +9 -0
- package/docs/docs/cmd/spo/page/page-column-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-column-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-set.md +4 -4
- package/docs/docs/cmd/spo/page/page-section-add.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-list.md +3 -3
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-deny.md +2 -2
- package/docs/docs/cmd/spo/site/site-add.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-add.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-get.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-set.md +5 -5
- package/docs/docs/cmd/spo/site/site-chrome-set.md +4 -4
- package/docs/docs/cmd/spo/site/site-groupify.md +5 -11
- package/docs/docs/cmd/spo/site/site-list.md +6 -6
- package/docs/docs/cmd/spo/site/site-rename.md +6 -6
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.md +2 -2
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.md +5 -5
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.md +6 -3
- package/docs/docs/cmd/spo/web/web-add.md +4 -4
- package/docs/docs/cmd/spo/web/web-get.md +3 -3
- package/docs/docs/cmd/spo/web/web-list.md +2 -2
- package/docs/docs/cmd/spo/web/web-reindex.md +2 -2
- package/docs/docs/cmd/spo/web/web-remove.md +2 -2
- package/docs/docs/cmd/spo/web/web-roleinheritance-reset.md +9 -0
- package/docs/docs/cmd/spo/web/web-set.md +9 -9
- package/docs/docs/cmd/teams/app/app-install.md +5 -5
- package/docs/docs/cmd/teams/app/app-uninstall.md +3 -3
- package/docs/docs/cmd/teams/channel/channel-get.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-member-add.md +0 -6
- package/docs/docs/cmd/teams/channel/channel-member-list.md +0 -6
- package/docs/docs/cmd/teams/channel/channel-member-remove.md +0 -6
- package/docs/docs/cmd/teams/channel/channel-remove.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-set.md +4 -4
- package/docs/docs/cmd/teams/message/message-get.md +3 -3
- package/docs/docs/cmd/teams/tab/tab-get.md +6 -6
- package/docs/docs/cmd/teams/tab/tab-remove.md +4 -4
- package/docs/docs/cmd/teams/team/team-archive.md +0 -3
- package/docs/docs/cmd/teams/team/team-clone.md +0 -3
- package/docs/docs/cmd/teams/team/team-remove.md +0 -3
- package/docs/docs/cmd/teams/team/team-set.md +0 -3
- package/docs/docs/cmd/teams/team/team-unarchive.md +0 -3
- package/docs/docs/cmd/teams/user/user-app-add.md +3 -3
- package/docs/docs/cmd/teams/user/user-app-remove.md +3 -3
- package/docs/docs/cmd/viva/connections/connections-app-create.md +2 -2
- package/docs/docs/cmd/yammer/group/group-user-add.md +5 -5
- package/docs/docs/cmd/yammer/group/group-user-remove.md +5 -5
- package/docs/docs/cmd/yammer/message/message-like-set.md +4 -4
- package/docs/docs/cmd/yammer/user/user-get.md +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/m365/spo/commands/site/site-classic-add.js +0 -342
- package/dist/m365/spo/commands/site/site-classic-list.js +0 -106
- package/dist/m365/spo/commands/site/site-classic-set.js +0 -367
- package/docs/docs/cmd/spo/site/site-classic-add.md +0 -93
- package/docs/docs/cmd/spo/site/site-classic-list.md +0 -68
- package/docs/docs/cmd/spo/site/site-classic-set.md +0 -102
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoListRoleInheritanceResetCommand_instances, _SpoListRoleInheritanceResetCommand_initTelemetry, _SpoListRoleInheritanceResetCommand_initOptions, _SpoListRoleInheritanceResetCommand_initValidators, _SpoListRoleInheritanceResetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const cli_1 = require("../../../../cli");
|
|
18
19
|
const request_1 = require("../../../../request");
|
|
19
20
|
const utils_1 = require("../../../../utils");
|
|
20
21
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
@@ -35,35 +36,57 @@ class SpoListRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
35
36
|
return 'Restores role inheritance on list or library';
|
|
36
37
|
}
|
|
37
38
|
commandAction(logger, args, cb) {
|
|
39
|
+
var _a;
|
|
38
40
|
if (this.verbose) {
|
|
39
41
|
logger.logToStderr(`Restore role inheritance of list in site at ${args.options.webUrl}...`);
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
const resetListRoleInheritance = () => {
|
|
44
|
+
let requestUrl = `${args.options.webUrl}/_api/web/lists`;
|
|
45
|
+
if (args.options.listId) {
|
|
46
|
+
requestUrl += `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
requestUrl += `/getbytitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
50
|
+
}
|
|
51
|
+
const requestOptions = {
|
|
52
|
+
url: `${requestUrl}/resetroleinheritance`,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: {
|
|
55
|
+
'accept': 'application/json;odata=nometadata',
|
|
56
|
+
'content-type': 'application/json'
|
|
57
|
+
},
|
|
58
|
+
responseType: 'json'
|
|
59
|
+
};
|
|
60
|
+
request_1.default
|
|
61
|
+
.post(requestOptions)
|
|
62
|
+
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
63
|
+
};
|
|
64
|
+
if (args.options.confirm) {
|
|
65
|
+
resetListRoleInheritance();
|
|
44
66
|
}
|
|
45
67
|
else {
|
|
46
|
-
|
|
68
|
+
cli_1.Cli.prompt({
|
|
69
|
+
type: 'confirm',
|
|
70
|
+
name: 'continue',
|
|
71
|
+
default: false,
|
|
72
|
+
message: `Are you sure you want to reset the role inheritance of ${(_a = args.options.listId) !== null && _a !== void 0 ? _a : args.options.listTitle}?`
|
|
73
|
+
}, (result) => {
|
|
74
|
+
if (!result.continue) {
|
|
75
|
+
cb();
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
resetListRoleInheritance();
|
|
79
|
+
}
|
|
80
|
+
});
|
|
47
81
|
}
|
|
48
|
-
const requestOptions = {
|
|
49
|
-
url: `${requestUrl}/resetroleinheritance`,
|
|
50
|
-
method: 'POST',
|
|
51
|
-
headers: {
|
|
52
|
-
'accept': 'application/json;odata=nometadata',
|
|
53
|
-
'content-type': 'application/json'
|
|
54
|
-
},
|
|
55
|
-
responseType: 'json'
|
|
56
|
-
};
|
|
57
|
-
request_1.default
|
|
58
|
-
.post(requestOptions)
|
|
59
|
-
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
60
82
|
}
|
|
61
83
|
}
|
|
62
84
|
_SpoListRoleInheritanceResetCommand_instances = new WeakSet(), _SpoListRoleInheritanceResetCommand_initTelemetry = function _SpoListRoleInheritanceResetCommand_initTelemetry() {
|
|
63
85
|
this.telemetry.push((args) => {
|
|
64
86
|
Object.assign(this.telemetryProperties, {
|
|
65
87
|
listId: typeof args.options.listId !== 'undefined',
|
|
66
|
-
listTitle: typeof args.options.listTitle !== 'undefined'
|
|
88
|
+
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
89
|
+
confirm: (!(!args.options.confirm)).toString()
|
|
67
90
|
});
|
|
68
91
|
});
|
|
69
92
|
}, _SpoListRoleInheritanceResetCommand_initOptions = function _SpoListRoleInheritanceResetCommand_initOptions() {
|
|
@@ -73,6 +96,8 @@ _SpoListRoleInheritanceResetCommand_instances = new WeakSet(), _SpoListRoleInher
|
|
|
73
96
|
option: '-i, --listId [listId]'
|
|
74
97
|
}, {
|
|
75
98
|
option: '-t, --listTitle [listTitle]'
|
|
99
|
+
}, {
|
|
100
|
+
option: '--confirm'
|
|
76
101
|
});
|
|
77
102
|
}, _SpoListRoleInheritanceResetCommand_initValidators = function _SpoListRoleInheritanceResetCommand_initValidators() {
|
|
78
103
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -39,13 +39,13 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
|
|
|
39
39
|
let viewSelector = '';
|
|
40
40
|
let currentField;
|
|
41
41
|
if (this.verbose) {
|
|
42
|
-
logger.logToStderr(`Getting field ${args.options.
|
|
42
|
+
logger.logToStderr(`Getting field ${args.options.id || args.options.title}...`);
|
|
43
43
|
}
|
|
44
44
|
this
|
|
45
45
|
.getField(args.options, listSelector)
|
|
46
46
|
.then((field) => {
|
|
47
47
|
if (this.verbose) {
|
|
48
|
-
logger.logToStderr(`Adding the field ${args.options.
|
|
48
|
+
logger.logToStderr(`Adding the field ${args.options.id || args.options.title} to the view ${args.options.viewId || args.options.viewTitle}...`);
|
|
49
49
|
}
|
|
50
50
|
currentField = field;
|
|
51
51
|
viewSelector = args.options.viewId ? `('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
@@ -60,7 +60,7 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
|
|
|
60
60
|
return request_1.default.post(postRequestOptions);
|
|
61
61
|
})
|
|
62
62
|
.then(() => {
|
|
63
|
-
if (typeof args.options.
|
|
63
|
+
if (typeof args.options.position === 'undefined') {
|
|
64
64
|
if (this.debug) {
|
|
65
65
|
logger.logToStderr(`No field position.`);
|
|
66
66
|
}
|
|
@@ -68,10 +68,10 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
|
|
|
68
68
|
}
|
|
69
69
|
if (this.debug) {
|
|
70
70
|
logger.logToStderr(`moveField request...`);
|
|
71
|
-
logger.logToStderr(args.options.
|
|
71
|
+
logger.logToStderr(args.options.position);
|
|
72
72
|
}
|
|
73
73
|
if (this.verbose) {
|
|
74
|
-
logger.logToStderr(`Moving the field ${args.options.
|
|
74
|
+
logger.logToStderr(`Moving the field ${args.options.id || args.options.title} to the position ${args.options.position} from view ${args.options.viewId || args.options.viewTitle}...`);
|
|
75
75
|
}
|
|
76
76
|
const moveRequestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}/viewfields/moveviewfieldto`;
|
|
77
77
|
const moveRequestOptions = {
|
|
@@ -79,7 +79,7 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
|
|
|
79
79
|
headers: {
|
|
80
80
|
'accept': 'application/json;odata=nometadata'
|
|
81
81
|
},
|
|
82
|
-
data: { 'field': currentField.InternalName, 'index': args.options.
|
|
82
|
+
data: { 'field': currentField.InternalName, 'index': args.options.position },
|
|
83
83
|
responseType: 'json'
|
|
84
84
|
};
|
|
85
85
|
return request_1.default.post(moveRequestOptions);
|
|
@@ -90,7 +90,7 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
|
|
|
90
90
|
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
91
91
|
}
|
|
92
92
|
getField(options, listSelector) {
|
|
93
|
-
const fieldSelector = options.
|
|
93
|
+
const fieldSelector = options.id ? `/getbyid('${encodeURIComponent(options.id)}')` : `/getbyinternalnameortitle('${encodeURIComponent(options.title)}')`;
|
|
94
94
|
const getRequestUrl = `${options.webUrl}/_api/web/lists${listSelector}/fields${fieldSelector}`;
|
|
95
95
|
const requestOptions = {
|
|
96
96
|
url: getRequestUrl,
|
|
@@ -109,9 +109,9 @@ _SpoListViewFieldAddCommand_instances = new WeakSet(), _SpoListViewFieldAddComma
|
|
|
109
109
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
110
110
|
viewId: typeof args.options.viewId !== 'undefined',
|
|
111
111
|
viewTitle: typeof args.options.viewTitle !== 'undefined',
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
id: typeof args.options.id !== 'undefined',
|
|
113
|
+
title: typeof args.options.title !== 'undefined',
|
|
114
|
+
position: typeof args.options.position !== 'undefined'
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
}, _SpoListViewFieldAddCommand_initOptions = function _SpoListViewFieldAddCommand_initOptions() {
|
|
@@ -126,11 +126,11 @@ _SpoListViewFieldAddCommand_instances = new WeakSet(), _SpoListViewFieldAddComma
|
|
|
126
126
|
}, {
|
|
127
127
|
option: '--viewTitle [viewTitle]'
|
|
128
128
|
}, {
|
|
129
|
-
option: '--
|
|
129
|
+
option: '--id [id]'
|
|
130
130
|
}, {
|
|
131
|
-
option: '--
|
|
131
|
+
option: '--title [title]'
|
|
132
132
|
}, {
|
|
133
|
-
option: '--
|
|
133
|
+
option: '--position [position]'
|
|
134
134
|
});
|
|
135
135
|
}, _SpoListViewFieldAddCommand_initValidators = function _SpoListViewFieldAddCommand_initValidators() {
|
|
136
136
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -148,21 +148,21 @@ _SpoListViewFieldAddCommand_instances = new WeakSet(), _SpoListViewFieldAddComma
|
|
|
148
148
|
return `${args.options.viewId} is not a valid GUID`;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
if (args.options.
|
|
152
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
153
|
-
return `${args.options.
|
|
151
|
+
if (args.options.id) {
|
|
152
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
153
|
+
return `${args.options.id} is not a valid GUID`;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
if (args.options.
|
|
157
|
-
const position = parseInt(args.options.
|
|
156
|
+
if (args.options.position) {
|
|
157
|
+
const position = parseInt(args.options.position);
|
|
158
158
|
if (isNaN(position)) {
|
|
159
|
-
return `${args.options.
|
|
159
|
+
return `${args.options.position} is not a number`;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
return true;
|
|
163
163
|
}));
|
|
164
164
|
}, _SpoListViewFieldAddCommand_initOptionSets = function _SpoListViewFieldAddCommand_initOptionSets() {
|
|
165
|
-
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['
|
|
165
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['id', 'title']);
|
|
166
166
|
};
|
|
167
167
|
module.exports = new SpoListViewFieldAddCommand();
|
|
168
168
|
//# sourceMappingURL=list-view-field-add.js.map
|
|
@@ -39,13 +39,13 @@ class SpoListViewFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
39
39
|
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
40
40
|
const removeFieldFromView = () => {
|
|
41
41
|
if (this.verbose) {
|
|
42
|
-
logger.logToStderr(`Getting field ${args.options.
|
|
42
|
+
logger.logToStderr(`Getting field ${args.options.id || args.options.title}...`);
|
|
43
43
|
}
|
|
44
44
|
this
|
|
45
45
|
.getField(args.options, listSelector)
|
|
46
46
|
.then((field) => {
|
|
47
47
|
if (this.verbose) {
|
|
48
|
-
logger.logToStderr(`Removing field ${args.options.
|
|
48
|
+
logger.logToStderr(`Removing field ${args.options.id || args.options.title} from view ${args.options.viewId || args.options.viewTitle}...`);
|
|
49
49
|
}
|
|
50
50
|
const viewSelector = args.options.viewId ? `('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
51
51
|
const postRequestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}/viewfields/removeviewfield('${field.InternalName}')`;
|
|
@@ -71,7 +71,7 @@ class SpoListViewFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
71
71
|
type: 'confirm',
|
|
72
72
|
name: 'continue',
|
|
73
73
|
default: false,
|
|
74
|
-
message: `Are you sure you want to remove the field ${args.options.
|
|
74
|
+
message: `Are you sure you want to remove the field ${args.options.id || args.options.title} from the view ${args.options.viewId || args.options.viewTitle} from list ${args.options.listId || args.options.listTitle} in site ${args.options.webUrl}?`
|
|
75
75
|
}, (result) => {
|
|
76
76
|
if (!result.continue) {
|
|
77
77
|
cb();
|
|
@@ -83,7 +83,7 @@ class SpoListViewFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
getField(options, listSelector) {
|
|
86
|
-
const fieldSelector = options.
|
|
86
|
+
const fieldSelector = options.id ? `/getbyid('${encodeURIComponent(options.id)}')` : `/getbyinternalnameortitle('${encodeURIComponent(options.title)}')`;
|
|
87
87
|
const getRequestUrl = `${options.webUrl}/_api/web/lists${listSelector}/fields${fieldSelector}`;
|
|
88
88
|
const requestOptions = {
|
|
89
89
|
url: getRequestUrl,
|
|
@@ -102,8 +102,8 @@ _SpoListViewFieldRemoveCommand_instances = new WeakSet(), _SpoListViewFieldRemov
|
|
|
102
102
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
103
103
|
viewId: typeof args.options.viewId !== 'undefined',
|
|
104
104
|
viewTitle: typeof args.options.viewTitle !== 'undefined',
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
id: typeof args.options.id !== 'undefined',
|
|
106
|
+
title: typeof args.options.title !== 'undefined',
|
|
107
107
|
confirm: (!(!args.options.confirm)).toString()
|
|
108
108
|
});
|
|
109
109
|
});
|
|
@@ -119,9 +119,9 @@ _SpoListViewFieldRemoveCommand_instances = new WeakSet(), _SpoListViewFieldRemov
|
|
|
119
119
|
}, {
|
|
120
120
|
option: '--viewTitle [viewTitle]'
|
|
121
121
|
}, {
|
|
122
|
-
option: '--
|
|
122
|
+
option: '--id [id]'
|
|
123
123
|
}, {
|
|
124
|
-
option: '--
|
|
124
|
+
option: '--title [title]'
|
|
125
125
|
}, {
|
|
126
126
|
option: '--confirm'
|
|
127
127
|
});
|
|
@@ -141,15 +141,15 @@ _SpoListViewFieldRemoveCommand_instances = new WeakSet(), _SpoListViewFieldRemov
|
|
|
141
141
|
return `${args.options.viewId} is not a valid GUID`;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
if (args.options.
|
|
145
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
144
|
+
if (args.options.id) {
|
|
145
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
146
146
|
return `${args.options.viewId} is not a valid GUID`;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
return true;
|
|
150
150
|
}));
|
|
151
151
|
}, _SpoListViewFieldRemoveCommand_initOptionSets = function _SpoListViewFieldRemoveCommand_initOptionSets() {
|
|
152
|
-
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['
|
|
152
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['id', 'title']);
|
|
153
153
|
};
|
|
154
154
|
module.exports = new SpoListViewFieldRemoveCommand();
|
|
155
155
|
//# sourceMappingURL=list-view-field-remove.js.map
|
|
@@ -38,13 +38,13 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
38
38
|
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
39
39
|
const viewSelector = args.options.viewId ? `('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
40
40
|
if (this.verbose) {
|
|
41
|
-
logger.logToStderr(`Getting field ${args.options.
|
|
41
|
+
logger.logToStderr(`Getting field ${args.options.id || args.options.title}...`);
|
|
42
42
|
}
|
|
43
43
|
this
|
|
44
44
|
.getField(args.options, listSelector)
|
|
45
45
|
.then((field) => {
|
|
46
46
|
if (this.verbose) {
|
|
47
|
-
logger.logToStderr(`Moving the field ${args.options.
|
|
47
|
+
logger.logToStderr(`Moving the field ${args.options.id || args.options.title} in view ${args.options.viewId || args.options.viewTitle} to position ${args.options.position}...`);
|
|
48
48
|
}
|
|
49
49
|
const moveRequestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}/viewfields/moveviewfieldto`;
|
|
50
50
|
const moveRequestOptions = {
|
|
@@ -54,7 +54,7 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
54
54
|
},
|
|
55
55
|
data: {
|
|
56
56
|
field: field.InternalName,
|
|
57
|
-
index: args.options.
|
|
57
|
+
index: args.options.position
|
|
58
58
|
},
|
|
59
59
|
responseType: 'json'
|
|
60
60
|
};
|
|
@@ -63,7 +63,7 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
63
63
|
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
64
64
|
}
|
|
65
65
|
getField(options, listSelector) {
|
|
66
|
-
const fieldSelector = options.
|
|
66
|
+
const fieldSelector = options.id ? `/getbyid('${encodeURIComponent(options.id)}')` : `/getbyinternalnameortitle('${encodeURIComponent(options.title)}')`;
|
|
67
67
|
const getRequestUrl = `${options.webUrl}/_api/web/lists${listSelector}/fields${fieldSelector}`;
|
|
68
68
|
const requestOptions = {
|
|
69
69
|
url: getRequestUrl,
|
|
@@ -82,8 +82,8 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
82
82
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
83
83
|
viewId: typeof args.options.viewId !== 'undefined',
|
|
84
84
|
viewTitle: typeof args.options.viewTitle !== 'undefined',
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
id: typeof args.options.id !== 'undefined',
|
|
86
|
+
title: typeof args.options.title !== 'undefined'
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
}, _SpoListViewFieldSetCommand_initOptions = function _SpoListViewFieldSetCommand_initOptions() {
|
|
@@ -98,11 +98,11 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
98
98
|
}, {
|
|
99
99
|
option: '--viewTitle [viewTitle]'
|
|
100
100
|
}, {
|
|
101
|
-
option: '--
|
|
101
|
+
option: '--id [id]'
|
|
102
102
|
}, {
|
|
103
|
-
option: '--
|
|
103
|
+
option: '--title [title]'
|
|
104
104
|
}, {
|
|
105
|
-
option: '--
|
|
105
|
+
option: '--position <position>'
|
|
106
106
|
});
|
|
107
107
|
}, _SpoListViewFieldSetCommand_initValidators = function _SpoListViewFieldSetCommand_initValidators() {
|
|
108
108
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -120,19 +120,19 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
120
120
|
return `${args.options.viewId} is not a valid GUID`;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
if (args.options.
|
|
124
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
125
|
-
return `${args.options.
|
|
123
|
+
if (args.options.id) {
|
|
124
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
125
|
+
return `${args.options.id} is not a valid GUID`;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
const position = parseInt(args.options.
|
|
128
|
+
const position = parseInt(args.options.position);
|
|
129
129
|
if (isNaN(position)) {
|
|
130
|
-
return `${args.options.
|
|
130
|
+
return `${args.options.position} is not a number`;
|
|
131
131
|
}
|
|
132
132
|
return true;
|
|
133
133
|
}));
|
|
134
134
|
}, _SpoListViewFieldSetCommand_initOptionSets = function _SpoListViewFieldSetCommand_initOptionSets() {
|
|
135
|
-
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['
|
|
135
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['id', 'title']);
|
|
136
136
|
};
|
|
137
137
|
module.exports = new SpoListViewFieldSetCommand();
|
|
138
138
|
//# sourceMappingURL=list-view-field-set.js.map
|
|
@@ -47,7 +47,7 @@ class SpoListViewGetCommand extends SpoCommand_1.default {
|
|
|
47
47
|
const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
48
48
|
listRestUrl = `/GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
49
49
|
}
|
|
50
|
-
const viewRestUrl = `/views/${(args.options.
|
|
50
|
+
const viewRestUrl = `/views/${(args.options.id ? `getById('${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`)}`;
|
|
51
51
|
const requestOptions = {
|
|
52
52
|
url: `${baseRestUrl}${listRestUrl}${viewRestUrl}`,
|
|
53
53
|
headers: {
|
|
@@ -69,8 +69,8 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
69
69
|
listId: typeof args.options.listId !== 'undefined',
|
|
70
70
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
71
71
|
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
id: typeof args.options.id !== 'undefined',
|
|
73
|
+
title: typeof args.options.title !== 'undefined'
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
}, _SpoListViewGetCommand_initOptions = function _SpoListViewGetCommand_initOptions() {
|
|
@@ -83,9 +83,9 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
83
83
|
}, {
|
|
84
84
|
option: '--listUrl [listUrl]'
|
|
85
85
|
}, {
|
|
86
|
-
option: '--
|
|
86
|
+
option: '--id [id]'
|
|
87
87
|
}, {
|
|
88
|
-
option: '--
|
|
88
|
+
option: '--title [title]'
|
|
89
89
|
});
|
|
90
90
|
}, _SpoListViewGetCommand_initValidators = function _SpoListViewGetCommand_initValidators() {
|
|
91
91
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -97,14 +97,14 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
97
97
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
98
98
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
99
99
|
}
|
|
100
|
-
if (args.options.
|
|
101
|
-
!utils_1.validation.isValidGuid(args.options.
|
|
102
|
-
return `${args.options.
|
|
100
|
+
if (args.options.id &&
|
|
101
|
+
!utils_1.validation.isValidGuid(args.options.id)) {
|
|
102
|
+
return `${args.options.id} in option id is not a valid GUID`;
|
|
103
103
|
}
|
|
104
104
|
return true;
|
|
105
105
|
}));
|
|
106
106
|
}, _SpoListViewGetCommand_initOptionSets = function _SpoListViewGetCommand_initOptionSets() {
|
|
107
|
-
this.optionSets.push(['listId', 'listTitle', 'listUrl'], ['
|
|
107
|
+
this.optionSets.push(['listId', 'listTitle', 'listUrl'], ['id', 'title']);
|
|
108
108
|
};
|
|
109
109
|
module.exports = new SpoListViewGetCommand();
|
|
110
110
|
//# sourceMappingURL=list-view-get.js.map
|
|
@@ -39,11 +39,11 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
|
|
|
39
39
|
const removeViewFromList = () => {
|
|
40
40
|
if (this.verbose) {
|
|
41
41
|
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
42
|
-
logger.logToStderr(`Removing view ${args.options.
|
|
42
|
+
logger.logToStderr(`Removing view ${args.options.id || args.options.title} from list ${list} in site at ${args.options.webUrl}...`);
|
|
43
43
|
}
|
|
44
44
|
let requestUrl = '';
|
|
45
45
|
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
46
|
-
const viewSelector = args.options.
|
|
46
|
+
const viewSelector = args.options.id ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`;
|
|
47
47
|
requestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}`;
|
|
48
48
|
const requestOptions = {
|
|
49
49
|
url: requestUrl,
|
|
@@ -69,7 +69,7 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
|
|
|
69
69
|
type: 'confirm',
|
|
70
70
|
name: 'continue',
|
|
71
71
|
default: false,
|
|
72
|
-
message: `Are you sure you want to remove the view ${args.options.
|
|
72
|
+
message: `Are you sure you want to remove the view ${args.options.id || args.options.title} from the list ${args.options.listId || args.options.listTitle} in site ${args.options.webUrl}?`
|
|
73
73
|
}, (result) => {
|
|
74
74
|
if (!result.continue) {
|
|
75
75
|
cb();
|
|
@@ -86,8 +86,8 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
86
86
|
Object.assign(this.telemetryProperties, {
|
|
87
87
|
listId: typeof args.options.listId !== 'undefined',
|
|
88
88
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
id: typeof args.options.id !== 'undefined',
|
|
90
|
+
title: typeof args.options.title !== 'undefined',
|
|
91
91
|
confirm: (!(!args.options.confirm)).toString()
|
|
92
92
|
});
|
|
93
93
|
});
|
|
@@ -99,9 +99,9 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
99
99
|
}, {
|
|
100
100
|
option: '--listTitle [listTitle]'
|
|
101
101
|
}, {
|
|
102
|
-
option: '--
|
|
102
|
+
option: '--id [id]'
|
|
103
103
|
}, {
|
|
104
|
-
option: '--
|
|
104
|
+
option: '--title [title]'
|
|
105
105
|
}, {
|
|
106
106
|
option: '--confirm'
|
|
107
107
|
});
|
|
@@ -116,15 +116,15 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
116
116
|
return `${args.options.listId} is not a valid GUID`;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
if (args.options.
|
|
120
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
121
|
-
return `${args.options.
|
|
119
|
+
if (args.options.id) {
|
|
120
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
121
|
+
return `${args.options.id} is not a valid GUID`;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
return true;
|
|
125
125
|
}));
|
|
126
126
|
}, _SpoListViewRemoveCommand_initOptionSets = function _SpoListViewRemoveCommand_initOptionSets() {
|
|
127
|
-
this.optionSets.push(['listId', 'listTitle'], ['
|
|
127
|
+
this.optionSets.push(['listId', 'listTitle'], ['id', 'title']);
|
|
128
128
|
};
|
|
129
129
|
module.exports = new SpoListViewRemoveCommand();
|
|
130
130
|
//# sourceMappingURL=list-view-remove.js.map
|
|
@@ -42,7 +42,7 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
|
|
|
42
42
|
const listRestUrl = args.options.listId ?
|
|
43
43
|
`(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`
|
|
44
44
|
: `/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
45
|
-
const viewRestUrl = `/views/${(args.options.
|
|
45
|
+
const viewRestUrl = `/views/${(args.options.id ? `getById('${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`)}`;
|
|
46
46
|
utils_1.spo
|
|
47
47
|
.getRequestDigest(args.options.webUrl)
|
|
48
48
|
.then((res) => {
|
|
@@ -66,8 +66,8 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
|
|
|
66
66
|
'webUrl',
|
|
67
67
|
'listId',
|
|
68
68
|
'listTitle',
|
|
69
|
-
'
|
|
70
|
-
'
|
|
69
|
+
'id',
|
|
70
|
+
'title',
|
|
71
71
|
'debug',
|
|
72
72
|
'verbose',
|
|
73
73
|
'output'
|
|
@@ -85,8 +85,8 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
85
85
|
Object.assign(this.telemetryProperties, {
|
|
86
86
|
listId: typeof args.options.listId !== 'undefined',
|
|
87
87
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
id: typeof args.options.id !== 'undefined',
|
|
89
|
+
title: typeof args.options.title !== 'undefined'
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
}, _SpoListViewSetCommand_initOptions = function _SpoListViewSetCommand_initOptions() {
|
|
@@ -97,9 +97,9 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
97
97
|
}, {
|
|
98
98
|
option: '--listTitle [listTitle]'
|
|
99
99
|
}, {
|
|
100
|
-
option: '--
|
|
100
|
+
option: '--id [id]'
|
|
101
101
|
}, {
|
|
102
|
-
option: '--
|
|
102
|
+
option: '--title [title]'
|
|
103
103
|
});
|
|
104
104
|
}, _SpoListViewSetCommand_initValidators = function _SpoListViewSetCommand_initValidators() {
|
|
105
105
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -111,14 +111,14 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
111
111
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
112
112
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
113
113
|
}
|
|
114
|
-
if (args.options.
|
|
115
|
-
!utils_1.validation.isValidGuid(args.options.
|
|
116
|
-
return `${args.options.
|
|
114
|
+
if (args.options.id &&
|
|
115
|
+
!utils_1.validation.isValidGuid(args.options.id)) {
|
|
116
|
+
return `${args.options.id} in option id is not a valid GUID`;
|
|
117
117
|
}
|
|
118
118
|
return true;
|
|
119
119
|
}));
|
|
120
120
|
}, _SpoListViewSetCommand_initOptionSets = function _SpoListViewSetCommand_initOptionSets() {
|
|
121
|
-
this.optionSets.push(['listId', 'listTitle'], ['
|
|
121
|
+
this.optionSets.push(['listId', 'listTitle'], ['id', 'title']);
|
|
122
122
|
};
|
|
123
123
|
module.exports = new SpoListViewSetCommand();
|
|
124
124
|
//# sourceMappingURL=list-view-set.js.map
|
|
@@ -35,14 +35,8 @@ class SpoListItemListCommand extends SpoCommand_1.default {
|
|
|
35
35
|
return 'Gets a list of items from the specified list';
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
if (args.options.title) {
|
|
42
|
-
this.warn(logger, `Option 'title' is deprecated. Please use 'listTitle' instead.`);
|
|
43
|
-
}
|
|
44
|
-
const listIdArgument = args.options.listId || args.options.id || '';
|
|
45
|
-
const listTitleArgument = args.options.listTitle || args.options.title || '';
|
|
38
|
+
const listIdArgument = args.options.listId || '';
|
|
39
|
+
const listTitleArgument = args.options.listTitle || '';
|
|
46
40
|
let formDigestValue = '';
|
|
47
41
|
const fieldsArray = args.options.fields ? args.options.fields.split(",")
|
|
48
42
|
: (!args.options.output || args.options.output === "text") ? ["Title", "Id"] : [];
|
|
@@ -120,10 +114,8 @@ class SpoListItemListCommand extends SpoCommand_1.default {
|
|
|
120
114
|
_SpoListItemListCommand_instances = new WeakSet(), _SpoListItemListCommand_initTelemetry = function _SpoListItemListCommand_initTelemetry() {
|
|
121
115
|
this.telemetry.push((args) => {
|
|
122
116
|
Object.assign(this.telemetryProperties, {
|
|
123
|
-
id: typeof args.options.id !== 'undefined',
|
|
124
117
|
listId: typeof args.options.listId !== 'undefined',
|
|
125
118
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
126
|
-
title: typeof args.options.title !== 'undefined',
|
|
127
119
|
fields: typeof args.options.fields !== 'undefined',
|
|
128
120
|
filter: typeof args.options.filter !== 'undefined',
|
|
129
121
|
pageNumber: typeof args.options.pageNumber !== 'undefined',
|
|
@@ -134,10 +126,6 @@ _SpoListItemListCommand_instances = new WeakSet(), _SpoListItemListCommand_initT
|
|
|
134
126
|
}, _SpoListItemListCommand_initOptions = function _SpoListItemListCommand_initOptions() {
|
|
135
127
|
this.options.unshift({
|
|
136
128
|
option: '-u, --webUrl <webUrl>'
|
|
137
|
-
}, {
|
|
138
|
-
option: '--id [id]'
|
|
139
|
-
}, {
|
|
140
|
-
option: '--title [title]'
|
|
141
129
|
}, {
|
|
142
130
|
option: '-i, --listId [listId]'
|
|
143
131
|
}, {
|
|
@@ -159,15 +147,11 @@ _SpoListItemListCommand_instances = new WeakSet(), _SpoListItemListCommand_initT
|
|
|
159
147
|
if (isValidSharePointUrl !== true) {
|
|
160
148
|
return isValidSharePointUrl;
|
|
161
149
|
}
|
|
162
|
-
if (!args.options.
|
|
150
|
+
if (!args.options.listId && !args.options.listTitle) {
|
|
163
151
|
return `Specify listId or listTitle`;
|
|
164
152
|
}
|
|
165
|
-
if (args.options.
|
|
166
|
-
return `Specify
|
|
167
|
-
}
|
|
168
|
-
// Check if only one of the 4 options is specified
|
|
169
|
-
if ([args.options.id, args.options.title, args.options.listId, args.options.listTitle].filter(o => o).length > 1) {
|
|
170
|
-
return 'Specify listId or listTitle but not both';
|
|
153
|
+
if (args.options.listId && args.options.listTitle) {
|
|
154
|
+
return `Specify listId or listTitle but not both`;
|
|
171
155
|
}
|
|
172
156
|
if (args.options.camlQuery && args.options.fields) {
|
|
173
157
|
return `Specify camlQuery or fields but not both`;
|
|
@@ -190,13 +174,10 @@ _SpoListItemListCommand_instances = new WeakSet(), _SpoListItemListCommand_initT
|
|
|
190
174
|
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
191
175
|
return `${args.options.listId} is not a valid GUID`;
|
|
192
176
|
}
|
|
193
|
-
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
194
|
-
return `${args.options.id} in option id is not a valid GUID`;
|
|
195
|
-
}
|
|
196
177
|
return true;
|
|
197
178
|
}));
|
|
198
179
|
}, _SpoListItemListCommand_initTypes = function _SpoListItemListCommand_initTypes() {
|
|
199
|
-
this.types.string.push('webUrl', '
|
|
180
|
+
this.types.string.push('webUrl', 'camlQuery', 'pageSize', 'pageNumber', 'fields', 'filter');
|
|
200
181
|
};
|
|
201
182
|
module.exports = new SpoListItemListCommand();
|
|
202
183
|
//# sourceMappingURL=listitem-list.js.map
|