@pnp/cli-microsoft365 5.9.0-beta.850564a → 5.9.0-beta.a3284ab
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.js +17 -2
- package/README.md +5 -0
- package/dist/Auth.js +4 -4
- package/dist/Command.js +8 -8
- package/dist/api.js +3 -3
- package/dist/appInsights.js +2 -0
- package/dist/cli/Cli.js +6 -4
- package/dist/index.js +2 -2
- package/dist/m365/aad/commands/app/app-add.js +41 -16
- package/dist/m365/aad/commands/app/app-get.js +3 -3
- package/dist/m365/aad/commands/app/app-remove.js +5 -5
- package/dist/m365/aad/commands/app/app-role-list.js +2 -2
- package/dist/m365/aad/commands/app/app-role-remove.js +4 -4
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +4 -4
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +3 -3
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +6 -6
- package/dist/m365/aad/commands/group/group-list.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-add.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-get.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-list.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +4 -4
- package/dist/m365/aad/commands/groupsetting/groupsetting-set.js +2 -2
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-get.js +4 -3
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-list.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-add.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-conversation-list.js +4 -3
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +4 -3
- package/dist/m365/aad/commands/o365group/o365group-get.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-list.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-clear.js +4 -4
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-remove.js +7 -6
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +5 -4
- package/dist/m365/aad/commands/o365group/o365group-remove.js +4 -4
- package/dist/m365/aad/commands/o365group/o365group-renew.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-set.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-user-add.js +3 -3
- package/dist/m365/aad/commands/o365group/o365group-user-list.js +5 -4
- package/dist/m365/aad/commands/o365group/o365group-user-remove.js +5 -5
- package/dist/m365/aad/commands/o365group/o365group-user-set.js +6 -5
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-add.js +3 -3
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-list.js +2 -2
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -2
- package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -2
- package/dist/m365/aad/commands/sp/sp-add.js +3 -3
- package/dist/m365/aad/commands/sp/sp-get.js +3 -3
- package/dist/m365/aad/commands/user/user-get.js +2 -2
- package/dist/m365/aad/commands/user/user-hibp.js +2 -2
- package/dist/m365/aad/commands/user/user-list.js +2 -2
- package/dist/m365/aad/commands/user/user-set.js +2 -2
- package/dist/m365/aad/commands/user/user-signin-list.js +5 -4
- package/dist/m365/app/commands/app-get.js +2 -2
- package/dist/m365/app/commands/app-open.js +2 -2
- package/dist/m365/app/commands/permission/permission-list.js +2 -2
- package/dist/m365/base/AppCommand.js +4 -4
- package/dist/m365/booking/commands/business/business-list.js +2 -2
- package/dist/m365/cli/commands/cli-doctor.js +4 -4
- package/dist/m365/cli/commands/cli-reconsent.js +2 -2
- package/dist/m365/cli/commands/config/config-get.js +2 -2
- package/dist/m365/cli/commands/config/config-reset.js +3 -3
- package/dist/m365/cli/commands/config/config-set.js +2 -2
- package/dist/m365/commands/status.js +3 -3
- package/dist/m365/file/commands/file-add.js +3 -3
- package/dist/m365/file/commands/file-list.js +4 -3
- package/dist/m365/flow/commands/flow-export.js +2 -2
- package/dist/m365/flow/commands/flow-remove.js +4 -4
- package/dist/m365/flow/commands/run/run-cancel.js +4 -4
- package/dist/m365/flow/commands/run/run-resubmit.js +4 -4
- package/dist/m365/graph/commands/changelog/changelog-list.js +5 -4
- package/dist/m365/graph/commands/schemaextension/schemaextension-add.js +2 -2
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +2 -2
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +2 -2
- package/dist/m365/graph/commands/schemaextension/schemaextension-set.js +2 -2
- package/dist/m365/graph/commands/subscription/subscription-add.js +2 -2
- package/dist/m365/onedrive/commands/onedrive-list.js +3 -3
- package/dist/m365/onenote/commands/notebook/notebook-list.js +5 -4
- package/dist/m365/outlook/commands/mail/mail-send.js +55 -31
- package/dist/m365/outlook/commands/message/message-list.js +2 -2
- package/dist/m365/outlook/commands/room/room-list.js +2 -2
- package/dist/m365/outlook/commands/roomlist/roomlist-list.js +2 -2
- package/dist/m365/pa/commands/app/app-get.js +4 -4
- package/dist/m365/pa/commands/app/app-list.js +2 -2
- package/dist/m365/pa/commands/app/app-remove.js +4 -4
- package/dist/m365/pa/commands/connector/connector-list.js +2 -2
- package/dist/m365/pa/commands/pcf/pcf-init.js +4 -4
- package/dist/m365/pa/commands/solution/solution-init.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-add.js +4 -3
- package/dist/m365/planner/commands/bucket/bucket-get.js +5 -4
- package/dist/m365/planner/commands/bucket/bucket-list.js +6 -4
- package/dist/m365/planner/commands/bucket/bucket-remove.js +6 -5
- package/dist/m365/planner/commands/bucket/bucket-set.js +4 -3
- package/dist/m365/planner/commands/plan/plan-add.js +9 -6
- package/dist/m365/planner/commands/plan/plan-get.js +4 -3
- package/dist/m365/planner/commands/plan/plan-list.js +4 -3
- package/dist/m365/planner/commands/plan/plan-remove.js +6 -5
- package/dist/m365/planner/commands/task/task-add.js +9 -7
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +2 -2
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +2 -2
- package/dist/m365/planner/commands/task/task-get.js +4 -3
- package/dist/m365/planner/commands/task/task-list.js +11 -9
- package/dist/m365/planner/commands/task/task-reference-add.js +2 -2
- package/dist/m365/planner/commands/task/task-reference-list.js +2 -2
- package/dist/m365/planner/commands/task/task-reference-remove.js +4 -4
- package/dist/m365/planner/commands/task/task-remove.js +8 -6
- package/dist/m365/planner/commands/task/task-set.js +9 -7
- package/dist/m365/planner/commands/tenant/tenant-settings-set.js +2 -2
- package/dist/m365/pp/commands/Environment.js +3 -0
- package/dist/m365/pp/commands/card/card-get.js +110 -0
- package/dist/m365/pp/commands/card/card-list.js +68 -0
- package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +69 -0
- package/dist/m365/pp/commands/environment/environment-get.js +75 -0
- package/dist/m365/pp/commands/gateway/gateway-get.js +70 -0
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +3 -3
- package/dist/m365/pp/commands/managementapp/managementapp-list.js +2 -2
- package/dist/m365/pp/commands/solution/Solution.js +3 -0
- package/dist/m365/pp/commands/solution/solution-get.js +117 -0
- package/dist/m365/pp/commands/solution/solution-list.js +87 -0
- package/dist/m365/pp/commands/tenant/tenant-settings-list.js +45 -0
- package/dist/m365/pp/commands.js +9 -1
- package/dist/m365/search/commands/externalconnection/externalconnection-list.js +2 -2
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +2 -2
- package/dist/m365/spfx/commands/package/package-generate.js +4 -4
- package/dist/m365/spfx/commands/project/base-project-command.js +19 -18
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001008_DEP_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001009_DEP_react_dom.js +2 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001022_DEP_office_ui_fabric_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002015_DEVDEP_types_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002016_DEVDEP_types_react_dom.js +2 -2
- package/dist/m365/spfx/commands/project/project-doctor.js +7 -7
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001005_DEP_types_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001006_DEP_types_react_dom.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001008_DEP_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001009_DEP_react_dom.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001015_DEP_types_react_addons_shallow_compare.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001016_DEP_types_react_addons_update.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001017_DEP_types_react_addons_update.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001019_DEP_knockout.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001020_DEP_types_knockout.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001022_DEP_office_ui_fabric_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002015_DEVDEP_types_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002016_DEVDEP_types_react_dom.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002025_DEVDEP_eslint_plugin_react_hooks.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015008_FILE_eslintrc_js.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN020001_RES_types_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN022001_SCSS_remove_fabric_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN022002_SCSS_add_fabric_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0.js +0 -2
- package/dist/m365/spfx/commands/project/project-upgrade.js +24 -23
- package/dist/m365/spfx/commands/spfx-doctor.js +52 -7
- package/dist/m365/spo/commands/app/app-add.js +4 -3
- package/dist/m365/spo/commands/app/app-deploy.js +5 -4
- package/dist/m365/spo/commands/app/app-get.js +5 -4
- package/dist/m365/spo/commands/app/app-install.js +3 -3
- package/dist/m365/spo/commands/app/app-instance-list.js +2 -2
- package/dist/m365/spo/commands/app/app-list.js +4 -3
- package/dist/m365/spo/commands/app/app-remove.js +7 -6
- package/dist/m365/spo/commands/app/app-retract.js +7 -6
- package/dist/m365/spo/commands/app/app-uninstall.js +5 -5
- package/dist/m365/spo/commands/app/app-upgrade.js +3 -3
- package/dist/m365/spo/commands/apppage/apppage-add.js +2 -2
- package/dist/m365/spo/commands/apppage/apppage-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-get.js +4 -4
- package/dist/m365/spo/commands/cdn/cdn-origin-add.js +6 -5
- package/dist/m365/spo/commands/cdn/cdn-origin-list.js +4 -4
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +8 -7
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +4 -4
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +6 -5
- package/dist/m365/spo/commands/cdn/cdn-set.js +3 -3
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +91 -50
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +63 -29
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +8 -6
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +38 -16
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +4 -4
- package/dist/m365/spo/commands/contenttype/contenttype-set.js +13 -11
- package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-add.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-clear.js +4 -4
- package/dist/m365/spo/commands/customaction/customaction-get.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-list.js +2 -2
- package/dist/m365/spo/commands/customaction/customaction-remove.js +5 -5
- package/dist/m365/spo/commands/customaction/customaction-set.js +4 -4
- package/dist/m365/spo/commands/eventreceiver/EventReceiver.js +3 -0
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +9 -7
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +5 -4
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +182 -0
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +8 -6
- package/dist/m365/spo/commands/feature/feature-enable.js +2 -2
- package/dist/m365/spo/commands/feature/feature-list.js +2 -2
- package/dist/m365/spo/commands/field/field-add.js +6 -4
- package/dist/m365/spo/commands/field/field-get.js +12 -10
- package/dist/m365/spo/commands/field/field-list.js +9 -7
- package/dist/m365/spo/commands/field/field-remove.js +14 -12
- package/dist/m365/spo/commands/field/field-set.js +12 -10
- package/dist/m365/spo/commands/file/file-add.js +8 -5
- package/dist/m365/spo/commands/file/file-checkin.js +3 -3
- package/dist/m365/spo/commands/file/file-checkout.js +3 -3
- package/dist/m365/spo/commands/file/file-copy.js +34 -46
- package/dist/m365/spo/commands/file/file-get.js +3 -3
- package/dist/m365/spo/commands/file/file-list.js +4 -3
- package/dist/m365/spo/commands/file/file-move.js +33 -44
- package/dist/m365/spo/commands/file/file-remove.js +5 -5
- package/dist/m365/spo/commands/file/file-rename.js +24 -20
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +231 -0
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +180 -0
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +129 -0
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +125 -0
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +5 -4
- package/dist/m365/spo/commands/folder/folder-add.js +4 -3
- package/dist/m365/spo/commands/folder/folder-copy.js +8 -6
- package/dist/m365/spo/commands/folder/folder-get.js +38 -7
- package/dist/m365/spo/commands/folder/folder-list.js +4 -3
- package/dist/m365/spo/commands/folder/folder-move.js +8 -6
- package/dist/m365/spo/commands/folder/folder-remove.js +6 -5
- package/dist/m365/spo/commands/folder/folder-rename.js +8 -6
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +168 -0
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +94 -0
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +89 -0
- package/dist/m365/spo/commands/group/AssociatedGroupPropertiesCollection.js +3 -0
- package/dist/m365/spo/commands/group/group-add.js +3 -3
- package/dist/m365/spo/commands/group/group-get.js +2 -2
- package/dist/m365/spo/commands/group/group-list.js +51 -12
- package/dist/m365/spo/commands/group/group-remove.js +4 -4
- package/dist/m365/spo/commands/group/group-set.js +5 -5
- package/dist/m365/spo/commands/group/group-user-add.js +4 -4
- package/dist/m365/spo/commands/group/group-user-list.js +2 -2
- package/dist/m365/spo/commands/group/group-user-remove.js +4 -4
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +2 -2
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +2 -2
- package/dist/m365/spo/commands/homesite/homesite-get.js +2 -2
- package/dist/m365/spo/commands/homesite/homesite-remove.js +5 -5
- package/dist/m365/spo/commands/homesite/homesite-set.js +7 -5
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +5 -4
- package/dist/m365/spo/commands/hubsite/hubsite-data-get.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +6 -5
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +8 -7
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +4 -3
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +8 -6
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +10 -8
- package/dist/m365/spo/commands/hubsite/hubsite-set.js +10 -8
- package/dist/m365/spo/commands/hubsite/hubsite-theme-sync.js +2 -2
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +6 -5
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +3 -3
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +5 -5
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +7 -5
- package/dist/m365/spo/commands/list/list-add.js +5 -5
- package/dist/m365/spo/commands/list/list-contenttype-add.js +24 -20
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +63 -50
- package/dist/m365/spo/commands/list/list-contenttype-list.js +20 -11
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +22 -13
- package/dist/m365/spo/commands/list/list-get.js +6 -5
- package/dist/m365/spo/commands/list/list-label-get.js +8 -6
- package/dist/m365/spo/commands/list/list-label-set.js +9 -7
- package/dist/m365/spo/commands/list/list-list.js +2 -2
- package/dist/m365/spo/commands/list/list-remove.js +8 -7
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +23 -21
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +21 -19
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +18 -9
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +19 -10
- package/dist/m365/spo/commands/list/list-set.js +6 -6
- package/dist/m365/spo/commands/list/list-sitescript-get.js +8 -6
- package/dist/m365/spo/commands/list/list-view-add.js +8 -6
- package/dist/m365/spo/commands/list/list-view-field-add.js +8 -7
- package/dist/m365/spo/commands/list/list-view-field-remove.js +10 -9
- package/dist/m365/spo/commands/list/list-view-field-set.js +8 -7
- package/dist/m365/spo/commands/list/list-view-get.js +11 -9
- package/dist/m365/spo/commands/list/list-view-list.js +6 -5
- package/dist/m365/spo/commands/list/list-view-remove.js +9 -8
- package/dist/m365/spo/commands/list/list-view-set.js +10 -8
- package/dist/m365/spo/commands/list/list-webhook-add.js +23 -14
- package/dist/m365/spo/commands/list/list-webhook-get.js +22 -13
- package/dist/m365/spo/commands/list/list-webhook-list.js +28 -28
- package/dist/m365/spo/commands/list/list-webhook-remove.js +26 -17
- package/dist/m365/spo/commands/list/list-webhook-set.js +23 -14
- package/dist/m365/spo/commands/listitem/listitem-add.js +10 -7
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +6 -5
- package/dist/m365/spo/commands/listitem/listitem-get.js +6 -5
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +9 -7
- package/dist/m365/spo/commands/listitem/listitem-list.js +9 -7
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +10 -8
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +9 -7
- package/dist/m365/spo/commands/listitem/listitem-remove.js +8 -7
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +21 -19
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +6 -5
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +6 -5
- package/dist/m365/spo/commands/listitem/listitem-set.js +8 -6
- package/dist/m365/spo/commands/mail/mail-send.js +2 -2
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +2 -2
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +2 -2
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +6 -5
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +6 -5
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +3 -3
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +5 -5
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +3 -3
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +9 -7
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +7 -5
- package/dist/m365/spo/commands/page/Page.js +2 -2
- package/dist/m365/spo/commands/page/page-add.js +6 -4
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +3 -3
- 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 +3 -3
- package/dist/m365/spo/commands/page/page-control-list.js +2 -2
- package/dist/m365/spo/commands/page/page-control-set.js +3 -3
- package/dist/m365/spo/commands/page/page-copy.js +2 -2
- package/dist/m365/spo/commands/page/page-get.js +4 -3
- package/dist/m365/spo/commands/page/page-header-set.js +2 -2
- package/dist/m365/spo/commands/page/page-list.js +2 -2
- package/dist/m365/spo/commands/page/page-remove.js +8 -6
- 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/page/page-set.js +6 -4
- package/dist/m365/spo/commands/page/page-template-list.js +2 -2
- package/dist/m365/spo/commands/page/page-text-add.js +6 -4
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +4 -3
- package/dist/m365/spo/commands/propertybag/propertybag-get.js +5 -4
- package/dist/m365/spo/commands/propertybag/propertybag-list.js +5 -4
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +10 -8
- package/dist/m365/spo/commands/propertybag/propertybag-set.js +6 -5
- package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +2 -2
- package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +2 -2
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +2 -2
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +4 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-add.js +5 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +3 -3
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +5 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +7 -5
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +7 -5
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +3 -3
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +5 -5
- package/dist/m365/spo/commands/site/site-add.js +18 -16
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +7 -5
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +7 -5
- package/dist/m365/spo/commands/site/site-apppermission-add.js +3 -3
- package/dist/m365/spo/commands/site/site-apppermission-get.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-list.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 +3 -3
- package/dist/m365/spo/commands/site/site-chrome-set.js +2 -2
- package/dist/m365/spo/commands/site/site-classic-add.js +15 -13
- package/dist/m365/spo/commands/site/site-classic-list.js +5 -4
- package/dist/m365/spo/commands/site/site-classic-set.js +14 -12
- package/dist/m365/spo/commands/site/site-commsite-enable.js +8 -6
- package/dist/m365/spo/commands/site/site-ensure.js +8 -8
- package/dist/m365/spo/commands/site/site-get.js +2 -2
- package/dist/m365/spo/commands/site/site-groupify.js +2 -2
- package/dist/m365/spo/commands/site/site-inplacerecordsmanagement-set.js +3 -3
- package/dist/m365/spo/commands/site/site-list.js +5 -4
- package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +6 -5
- package/dist/m365/spo/commands/site/site-remove.js +18 -16
- package/dist/m365/spo/commands/site/site-rename.js +3 -3
- package/dist/m365/spo/commands/site/site-set.js +24 -21
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +5 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +5 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +4 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +2 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +7 -6
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +5 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +5 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +7 -6
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +3 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +3 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +5 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +4 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +2 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +6 -5
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +3 -3
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +5 -4
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +3 -3
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +7 -6
- package/dist/m365/spo/commands/sitescript/sitescript-set.js +5 -4
- package/dist/m365/spo/commands/spo-search.js +5 -4
- package/dist/m365/spo/commands/spo-set.js +2 -2
- package/dist/m365/spo/commands/storageentity/storageentity-get.js +2 -2
- package/dist/m365/spo/commands/storageentity/storageentity-list.js +2 -2
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +9 -7
- package/dist/m365/spo/commands/storageentity/storageentity-set.js +7 -5
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +7 -7
- package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +2 -2
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +3 -3
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +10 -8
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +4 -3
- package/dist/m365/spo/commands/tenant/tenant-settings-list.js +3 -3
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +6 -5
- package/dist/m365/spo/commands/term/term-add.js +15 -13
- package/dist/m365/spo/commands/term/term-get.js +11 -9
- package/dist/m365/spo/commands/term/term-group-add.js +8 -6
- package/dist/m365/spo/commands/term/term-group-get.js +7 -5
- package/dist/m365/spo/commands/term/term-group-list.js +3 -3
- package/dist/m365/spo/commands/term/term-list.js +9 -7
- package/dist/m365/spo/commands/term/term-set-add.js +11 -9
- package/dist/m365/spo/commands/term/term-set-get.js +9 -7
- package/dist/m365/spo/commands/term/term-set-list.js +7 -5
- package/dist/m365/spo/commands/theme/theme-apply.js +7 -5
- package/dist/m365/spo/commands/theme/theme-get.js +5 -4
- package/dist/m365/spo/commands/theme/theme-list.js +2 -2
- package/dist/m365/spo/commands/theme/theme-remove.js +4 -4
- package/dist/m365/spo/commands/theme/theme-set.js +7 -5
- package/dist/m365/spo/commands/user/user-get.js +2 -2
- package/dist/m365/spo/commands/user/user-list.js +2 -2
- package/dist/m365/spo/commands/user/user-remove.js +4 -4
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +4 -3
- package/dist/m365/spo/commands/userprofile/userprofile-set.js +3 -3
- package/dist/m365/spo/commands/web/web-add.js +5 -4
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +2 -2
- package/dist/m365/spo/commands/web/web-get.js +2 -2
- package/dist/m365/spo/commands/web/web-installedlanguage-list.js +2 -2
- package/dist/m365/spo/commands/web/web-list.js +2 -2
- package/dist/m365/spo/commands/web/web-reindex.js +6 -5
- package/dist/m365/spo/commands/web/web-remove.js +4 -4
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +16 -16
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +14 -14
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/web/web-set.js +2 -2
- package/dist/m365/spo/commands.js +8 -0
- package/dist/m365/teams/commands/app/app-install.js +6 -6
- package/dist/m365/teams/commands/app/app-list.js +4 -3
- package/dist/m365/teams/commands/app/app-remove.js +4 -4
- package/dist/m365/teams/commands/app/app-uninstall.js +4 -4
- package/dist/m365/teams/commands/app/app-update.js +2 -2
- package/dist/m365/teams/commands/cache/cache-remove.js +2 -2
- package/dist/m365/teams/commands/channel/channel-add.js +11 -11
- package/dist/m365/teams/commands/channel/channel-get.js +3 -3
- package/dist/m365/teams/commands/channel/channel-list.js +7 -6
- package/dist/m365/teams/commands/channel/channel-member-add.js +3 -3
- package/dist/m365/teams/commands/channel/channel-member-list.js +5 -4
- package/dist/m365/teams/commands/channel/channel-member-remove.js +6 -6
- package/dist/m365/teams/commands/channel/channel-member-set.js +4 -4
- package/dist/m365/teams/commands/channel/channel-remove.js +5 -5
- package/dist/m365/teams/commands/channel/channel-set.js +2 -2
- package/dist/m365/teams/commands/chat/chat-list.js +2 -2
- package/dist/m365/teams/commands/chat/chat-member-list.js +4 -3
- package/dist/m365/teams/commands/chat/chat-message-list.js +4 -3
- package/dist/m365/teams/commands/chat/chat-message-send.js +5 -4
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +2 -2
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +2 -2
- package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +2 -2
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +2 -2
- package/dist/m365/teams/commands/membersettings/membersettings-list.js +2 -2
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +2 -2
- package/dist/m365/teams/commands/message/message-get.js +3 -3
- package/dist/m365/teams/commands/message/message-list.js +7 -6
- package/dist/m365/teams/commands/message/message-reply-list.js +5 -4
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +2 -2
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +3 -3
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +3 -3
- package/dist/m365/teams/commands/report/report-pstncalls.js +3 -3
- package/dist/m365/teams/commands/tab/tab-add.js +3 -3
- package/dist/m365/teams/commands/tab/tab-get.js +4 -4
- package/dist/m365/teams/commands/tab/tab-list.js +5 -4
- package/dist/m365/teams/commands/tab/tab-remove.js +6 -6
- package/dist/m365/teams/commands/team/team-archive.js +3 -3
- package/dist/m365/teams/commands/team/team-clone.js +3 -3
- package/dist/m365/teams/commands/team/team-get.js +2 -2
- package/dist/m365/teams/commands/team/team-list.js +2 -2
- package/dist/m365/teams/commands/team/team-remove.js +5 -5
- package/dist/m365/teams/commands/team/team-set.js +3 -3
- package/dist/m365/teams/commands/team/team-unarchive.js +3 -3
- package/dist/m365/teams/commands/user/user-app-add.js +3 -3
- package/dist/m365/teams/commands/user/user-app-list.js +5 -4
- package/dist/m365/teams/commands/user/user-app-remove.js +4 -4
- package/dist/m365/teams/commands/user/user-list.js +5 -4
- package/dist/m365/tenant/commands/id/id-get.js +2 -2
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +2 -2
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +2 -2
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +2 -2
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +2 -2
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +2 -2
- package/dist/m365/todo/commands/list/list-list.js +2 -2
- package/dist/m365/todo/commands/list/list-remove.js +2 -2
- package/dist/m365/todo/commands/task/task-add.js +55 -3
- package/dist/m365/todo/commands/task/task-list.js +2 -2
- package/dist/m365/todo/commands/task/task-remove.js +2 -2
- package/dist/m365/todo/commands/task/task-set.js +53 -1
- package/dist/m365/viva/commands/connections/connections-app-create.js +2 -2
- package/dist/m365/yammer/commands/group/group-user-remove.js +2 -2
- package/dist/m365/yammer/commands/message/message-like-set.js +2 -2
- package/dist/m365/yammer/commands/message/message-remove.js +2 -2
- package/dist/request.js +4 -4
- package/dist/utils/cache.js +81 -0
- package/dist/utils/pid.js +57 -0
- package/dist/utils/powerPlatform.js +42 -0
- package/dist/utils/spo.js +7 -6
- package/docs/docs/_clisettings.md +19 -0
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-restore.md +1 -1
- package/docs/docs/cmd/aad/user/user-signin-list.md +1 -1
- package/docs/docs/cmd/onedrive/report/report-activityusercounts.md +1 -1
- package/docs/docs/cmd/outlook/mail/mail-send.md +13 -0
- package/docs/docs/cmd/planner/task/task-checklistitem-list.md +1 -1
- package/docs/docs/cmd/planner/task/task-reference-add.md +1 -1
- package/docs/docs/cmd/pp/card/card-get.md +51 -0
- package/docs/docs/cmd/pp/card/card-list.md +33 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.md +33 -0
- package/docs/docs/cmd/pp/environment/environment-get.md +38 -0
- package/docs/docs/cmd/pp/environment/environment-list.md +1 -1
- package/docs/docs/cmd/pp/gateway/gateway-get.md +24 -0
- package/docs/docs/cmd/pp/solution/solution-get.md +51 -0
- package/docs/docs/cmd/pp/solution/solution-list.md +33 -0
- package/docs/docs/cmd/pp/tenant/tenant-settings-list.md +26 -0
- package/docs/docs/cmd/search/externalconnection/externalconnection-remove.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +10 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-add.md +20 -2
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.md +22 -4
- package/docs/docs/cmd/spo/contenttype/contenttype-get.md +21 -3
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-get.md +2 -2
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.md +69 -0
- package/docs/docs/cmd/spo/file/file-roleassignment-add.md +57 -0
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.md +54 -0
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +54 -0
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.md +39 -0
- package/docs/docs/cmd/spo/folder/folder-get.md +13 -4
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.md +57 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +39 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +36 -0
- package/docs/docs/cmd/spo/group/group-list.md +10 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-get.md +3 -3
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +16 -7
- package/docs/docs/cmd/spo/list/list-contenttype-default-set.md +16 -7
- package/docs/docs/cmd/spo/list/list-contenttype-list.md +15 -6
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +17 -8
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +1 -1
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +1 -1
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +11 -8
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +14 -5
- package/docs/docs/cmd/spo/list/list-webhook-add.md +15 -16
- package/docs/docs/cmd/spo/list/list-webhook-get.md +15 -6
- package/docs/docs/cmd/spo/list/list-webhook-list.md +16 -7
- package/docs/docs/cmd/spo/list/list-webhook-remove.md +12 -10
- package/docs/docs/cmd/spo/list/list-webhook-set.md +13 -11
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.md +1 -1
- package/docs/docs/cmd/spo/roledefinition/roledefinition-add.md +1 -1
- package/docs/docs/cmd/spo/web/web-roleassignment-add.md +5 -5
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.md +5 -5
- package/docs/docs/cmd/spo/web/web-roleinheritance-reset.md +1 -1
- package/docs/docs/cmd/teams/cache/cache-remove.md +1 -1
- package/docs/docs/cmd/teams/channel/channel-add.md +5 -5
- package/docs/docs/cmd/teams/channel/channel-list.md +1 -1
- package/docs/docs/cmd/teams/channel/channel-member-set.md +1 -1
- package/docs/docs/cmd/teams/funsettings/funsettings-set.md +6 -6
- package/docs/docs/cmd/tenant/security/security-alerts-list.md +1 -1
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.md +1 -1
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.md +1 -1
- package/docs/docs/cmd/todo/task/task-add.md +32 -5
- package/docs/docs/cmd/todo/task/task-set.md +29 -2
- package/npm-shrinkwrap.json +342 -357
- package/package.json +27 -18
- package/dist/cli/index.js +0 -21
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +0 -60
- package/dist/utils/index.js +0 -31
|
@@ -16,7 +16,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoEventreceiverGetCommand_instances, _SpoEventreceiverGetCommand_initTelemetry, _SpoEventreceiverGetCommand_initOptions, _SpoEventreceiverGetCommand_initValidators, _SpoEventreceiverGetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
-
const
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
23
|
const commands_1 = require("../../commands");
|
|
22
24
|
class SpoEventreceiverGetCommand extends SpoCommand_1.default {
|
|
@@ -40,14 +42,14 @@ class SpoEventreceiverGetCommand extends SpoCommand_1.default {
|
|
|
40
42
|
let listUrl = '';
|
|
41
43
|
let filter = '?$filter=';
|
|
42
44
|
if (args.options.listId) {
|
|
43
|
-
listUrl = `lists(guid'${
|
|
45
|
+
listUrl = `lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
44
46
|
}
|
|
45
47
|
else if (args.options.listTitle) {
|
|
46
|
-
listUrl = `lists/getByTitle('${
|
|
48
|
+
listUrl = `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
47
49
|
}
|
|
48
50
|
else if (args.options.listUrl) {
|
|
49
|
-
const listServerRelativeUrl =
|
|
50
|
-
listUrl = `GetList('${
|
|
51
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
52
|
+
listUrl = `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
51
53
|
}
|
|
52
54
|
if (!args.options.scope || args.options.scope === 'web') {
|
|
53
55
|
requestUrl += `web/${listUrl}eventreceivers`;
|
|
@@ -108,7 +110,7 @@ _SpoEventreceiverGetCommand_instances = new WeakSet(), _SpoEventreceiverGetComma
|
|
|
108
110
|
});
|
|
109
111
|
}, _SpoEventreceiverGetCommand_initValidators = function _SpoEventreceiverGetCommand_initValidators() {
|
|
110
112
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
const isValidSharePointUrl =
|
|
113
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
112
114
|
if (isValidSharePointUrl !== true) {
|
|
113
115
|
return isValidSharePointUrl;
|
|
114
116
|
}
|
|
@@ -116,7 +118,7 @@ _SpoEventreceiverGetCommand_instances = new WeakSet(), _SpoEventreceiverGetComma
|
|
|
116
118
|
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
117
119
|
return `Specify either list id or title or list url`;
|
|
118
120
|
}
|
|
119
|
-
if (args.options.listId && !
|
|
121
|
+
if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
|
|
120
122
|
return `${args.options.listId} is not a valid GUID`;
|
|
121
123
|
}
|
|
122
124
|
if (args.options.scope && ['web', 'site'].indexOf(args.options.scope) === -1) {
|
|
@@ -16,7 +16,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoEventreceiverListCommand_instances, _SpoEventreceiverListCommand_initTelemetry, _SpoEventreceiverListCommand_initOptions, _SpoEventreceiverListCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
-
const
|
|
19
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
20
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
21
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
22
|
const commands_1 = require("../../commands");
|
|
22
23
|
class SpoEventreceiverListCommand extends SpoCommand_1.default {
|
|
@@ -47,7 +48,7 @@ class SpoEventreceiverListCommand extends SpoCommand_1.default {
|
|
|
47
48
|
listUrl = `lists/getByTitle('${encodeURIComponent(args.options.listTitle)}')/`;
|
|
48
49
|
}
|
|
49
50
|
else if (args.options.listUrl) {
|
|
50
|
-
const listServerRelativeUrl =
|
|
51
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
51
52
|
listUrl = `GetList('${encodeURIComponent(listServerRelativeUrl)}')/`;
|
|
52
53
|
}
|
|
53
54
|
if (!args.options.scope || args.options.scope === 'web') {
|
|
@@ -97,7 +98,7 @@ _SpoEventreceiverListCommand_instances = new WeakSet(), _SpoEventreceiverListCom
|
|
|
97
98
|
});
|
|
98
99
|
}, _SpoEventreceiverListCommand_initValidators = function _SpoEventreceiverListCommand_initValidators() {
|
|
99
100
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
const isValidSharePointUrl =
|
|
101
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
101
102
|
if (isValidSharePointUrl !== true) {
|
|
102
103
|
return isValidSharePointUrl;
|
|
103
104
|
}
|
|
@@ -105,7 +106,7 @@ _SpoEventreceiverListCommand_instances = new WeakSet(), _SpoEventreceiverListCom
|
|
|
105
106
|
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
106
107
|
return `Specify either list id or title or list url`;
|
|
107
108
|
}
|
|
108
|
-
if (args.options.listId && !
|
|
109
|
+
if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
|
|
109
110
|
return `${args.options.listId} is not a valid GUID`;
|
|
110
111
|
}
|
|
111
112
|
if (args.options.scope && ['web', 'site'].indexOf(args.options.scope) === -1) {
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _SpoEventreceiverRemoveCommand_instances, _SpoEventreceiverRemoveCommand_initTelemetry, _SpoEventreceiverRemoveCommand_initOptions, _SpoEventreceiverRemoveCommand_initValidators, _SpoEventreceiverRemoveCommand_initOptionSets;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
|
+
const validation_1 = require("../../../../utils/validation");
|
|
22
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
|
+
const commands_1 = require("../../commands");
|
|
24
|
+
const request_1 = require("../../../../request");
|
|
25
|
+
const getCommand = require('./eventreceiver-get');
|
|
26
|
+
class SpoEventreceiverRemoveCommand extends SpoCommand_1.default {
|
|
27
|
+
constructor() {
|
|
28
|
+
super();
|
|
29
|
+
_SpoEventreceiverRemoveCommand_instances.add(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoEventreceiverRemoveCommand_instances, "m", _SpoEventreceiverRemoveCommand_initTelemetry).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _SpoEventreceiverRemoveCommand_instances, "m", _SpoEventreceiverRemoveCommand_initOptions).call(this);
|
|
32
|
+
__classPrivateFieldGet(this, _SpoEventreceiverRemoveCommand_instances, "m", _SpoEventreceiverRemoveCommand_initValidators).call(this);
|
|
33
|
+
__classPrivateFieldGet(this, _SpoEventreceiverRemoveCommand_instances, "m", _SpoEventreceiverRemoveCommand_initOptionSets).call(this);
|
|
34
|
+
}
|
|
35
|
+
get name() {
|
|
36
|
+
return commands_1.default.EVENTRECEIVER_REMOVE;
|
|
37
|
+
}
|
|
38
|
+
get description() {
|
|
39
|
+
return 'Removes event receivers for the specified web, site, or list.';
|
|
40
|
+
}
|
|
41
|
+
commandAction(logger, args) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
try {
|
|
44
|
+
const getEventReceiversOutput = yield this.getEventReceivers(args.options);
|
|
45
|
+
const eventReceivers = JSON.parse(getEventReceiversOutput.stdout);
|
|
46
|
+
if (!eventReceivers.length) {
|
|
47
|
+
throw Error(`Specified event receiver with ${args.options.id !== undefined ? `id ${args.options.id}` : `name ${args.options.name}`} cannot be found`);
|
|
48
|
+
}
|
|
49
|
+
if (eventReceivers.length > 1) {
|
|
50
|
+
throw Error(`Multiple eventreceivers with ${args.options.id !== undefined ? `id ${args.options.id} found` : `name ${args.options.name}, ids: ${eventReceivers.map(x => x.ReceiverId)} found`}`);
|
|
51
|
+
}
|
|
52
|
+
if (args.options.confirm) {
|
|
53
|
+
yield this.removeEventReceiver(args.options);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const result = yield Cli_1.Cli.prompt({
|
|
57
|
+
type: 'confirm',
|
|
58
|
+
name: 'continue',
|
|
59
|
+
default: false,
|
|
60
|
+
message: `Are you sure you want to remove event receiver with ${args.options.id !== undefined ? `id ${args.options.id}` : `name ${args.options.name}`}?`
|
|
61
|
+
});
|
|
62
|
+
if (result.continue) {
|
|
63
|
+
yield this.removeEventReceiver(args.options);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
this.handleRejectedODataJsonPromise(err);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
removeEventReceiver(options) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
let requestUrl = `${options.webUrl}/_api/`;
|
|
75
|
+
let listUrl = '';
|
|
76
|
+
let filter = '?$filter=';
|
|
77
|
+
if (options.listId) {
|
|
78
|
+
listUrl = `lists(guid'${formatting_1.formatting.encodeQueryParameter(options.listId)}')/`;
|
|
79
|
+
}
|
|
80
|
+
else if (options.listTitle) {
|
|
81
|
+
listUrl = `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(options.listTitle)}')/`;
|
|
82
|
+
}
|
|
83
|
+
else if (options.listUrl) {
|
|
84
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
|
|
85
|
+
listUrl = `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
86
|
+
}
|
|
87
|
+
if (!options.scope || options.scope === 'web') {
|
|
88
|
+
requestUrl += `web/${listUrl}eventreceivers`;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
requestUrl += 'site/eventreceivers';
|
|
92
|
+
}
|
|
93
|
+
if (options.id) {
|
|
94
|
+
filter += `receiverid eq (guid'${options.id}')`;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
filter += `receivername eq '${options.name}'`;
|
|
98
|
+
}
|
|
99
|
+
const requestOptions = {
|
|
100
|
+
url: requestUrl + filter,
|
|
101
|
+
headers: {
|
|
102
|
+
'accept': 'application/json;odata=nometadata'
|
|
103
|
+
},
|
|
104
|
+
responseType: 'json'
|
|
105
|
+
};
|
|
106
|
+
yield request_1.default.delete(requestOptions);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
getEventReceivers(options) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
const getOptions = {
|
|
112
|
+
webUrl: options.webUrl,
|
|
113
|
+
listId: options.listId,
|
|
114
|
+
listTitle: options.listTitle,
|
|
115
|
+
listUrl: options.listUrl,
|
|
116
|
+
scope: options.scope,
|
|
117
|
+
id: options.id,
|
|
118
|
+
name: options.name,
|
|
119
|
+
debug: this.debug,
|
|
120
|
+
verbose: this.verbose
|
|
121
|
+
};
|
|
122
|
+
return yield Cli_1.Cli.executeCommandWithOutput(getCommand, { options: Object.assign(Object.assign({}, getOptions), { _: [] }) });
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
_SpoEventreceiverRemoveCommand_instances = new WeakSet(), _SpoEventreceiverRemoveCommand_initTelemetry = function _SpoEventreceiverRemoveCommand_initTelemetry() {
|
|
127
|
+
this.telemetry.push((args) => {
|
|
128
|
+
Object.assign(this.telemetryProperties, {
|
|
129
|
+
listId: typeof args.options.listId !== 'undefined',
|
|
130
|
+
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
131
|
+
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
132
|
+
scope: typeof args.options.scope !== 'undefined',
|
|
133
|
+
id: typeof args.options.id !== 'undefined',
|
|
134
|
+
name: typeof args.options.name !== 'undefined',
|
|
135
|
+
confirm: (!(!args.options.confirm)).toString()
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}, _SpoEventreceiverRemoveCommand_initOptions = function _SpoEventreceiverRemoveCommand_initOptions() {
|
|
139
|
+
this.options.unshift({
|
|
140
|
+
option: '-u, --webUrl <webUrl>'
|
|
141
|
+
}, {
|
|
142
|
+
option: '--listTitle [listTitle]'
|
|
143
|
+
}, {
|
|
144
|
+
option: '--listId [listId]'
|
|
145
|
+
}, {
|
|
146
|
+
option: '--listUrl [listUrl]'
|
|
147
|
+
}, {
|
|
148
|
+
option: '-n, --name [name]'
|
|
149
|
+
}, {
|
|
150
|
+
option: '-i, --id [id]'
|
|
151
|
+
}, {
|
|
152
|
+
option: '-s, --scope [scope]',
|
|
153
|
+
autocomplete: ['web', 'site']
|
|
154
|
+
}, {
|
|
155
|
+
option: '--confirm'
|
|
156
|
+
});
|
|
157
|
+
}, _SpoEventreceiverRemoveCommand_initValidators = function _SpoEventreceiverRemoveCommand_initValidators() {
|
|
158
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
160
|
+
if (isValidSharePointUrl !== true) {
|
|
161
|
+
return isValidSharePointUrl;
|
|
162
|
+
}
|
|
163
|
+
const listOptions = [args.options.listId, args.options.listTitle, args.options.listUrl];
|
|
164
|
+
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
165
|
+
return `Specify either list id or title or list url`;
|
|
166
|
+
}
|
|
167
|
+
if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
|
|
168
|
+
return `${args.options.listId} is not a valid GUID`;
|
|
169
|
+
}
|
|
170
|
+
if (args.options.scope && ['web', 'site'].indexOf(args.options.scope) === -1) {
|
|
171
|
+
return `${args.options.scope} is not a valid type value. Allowed values web|site.`;
|
|
172
|
+
}
|
|
173
|
+
if (args.options.scope && args.options.scope === 'site' && (args.options.listId || args.options.listUrl || args.options.listTitle)) {
|
|
174
|
+
return 'Scope cannot be set to site when retrieving list event receivers.';
|
|
175
|
+
}
|
|
176
|
+
return true;
|
|
177
|
+
}));
|
|
178
|
+
}, _SpoEventreceiverRemoveCommand_initOptionSets = function _SpoEventreceiverRemoveCommand_initOptionSets() {
|
|
179
|
+
this.optionSets.push(['name', 'id']);
|
|
180
|
+
};
|
|
181
|
+
module.exports = new SpoEventreceiverRemoveCommand();
|
|
182
|
+
//# sourceMappingURL=eventreceiver-remove.js.map
|
|
@@ -17,7 +17,9 @@ var _SpoExternalUserListCommand_instances, _SpoExternalUserListCommand_initTelem
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const config_1 = require("../../../../config");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
|
-
const
|
|
20
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const spo_1 = require("../../../../utils/spo");
|
|
22
|
+
const validation_1 = require("../../../../utils/validation");
|
|
21
23
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
22
24
|
const commands_1 = require("../../commands");
|
|
23
25
|
class SpoExternalUserListCommand extends SpoCommand_1.default {
|
|
@@ -37,8 +39,8 @@ class SpoExternalUserListCommand extends SpoCommand_1.default {
|
|
|
37
39
|
commandAction(logger, args) {
|
|
38
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
41
|
try {
|
|
40
|
-
const spoAdminUrl = yield
|
|
41
|
-
const reqDigest = yield
|
|
42
|
+
const spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
43
|
+
const reqDigest = yield spo_1.spo.getRequestDigest(spoAdminUrl);
|
|
42
44
|
if (this.verbose) {
|
|
43
45
|
logger.logToStderr(`Retrieving information about external users...`);
|
|
44
46
|
}
|
|
@@ -47,10 +49,10 @@ class SpoExternalUserListCommand extends SpoCommand_1.default {
|
|
|
47
49
|
const sortOrder = args.options.sortOrder === 'desc' ? 1 : 0;
|
|
48
50
|
let payload = '';
|
|
49
51
|
if (args.options.siteUrl) {
|
|
50
|
-
payload = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="135" ObjectPathId="134" /><Query Id="136" ObjectPathId="134"><Query SelectAllProperties="false"><Properties><Property Name="TotalUserCount" ScalarProperty="true" /><Property Name="UserCollectionPosition" ScalarProperty="true" /><Property Name="ExternalUserCollection"><Query SelectAllProperties="false"><Properties /></Query><ChildItemQuery SelectAllProperties="false"><Properties><Property Name="DisplayName" ScalarProperty="true" /><Property Name="InvitedAs" ScalarProperty="true" /><Property Name="UniqueId" ScalarProperty="true" /><Property Name="AcceptedAs" ScalarProperty="true" /><Property Name="WhenCreated" ScalarProperty="true" /><Property Name="InvitedBy" ScalarProperty="true" /></Properties></ChildItemQuery></Property></Properties></Query></Query></Actions><ObjectPaths><Method Id="134" ParentId="131" Name="GetExternalUsersForSite"><Parameters><Parameter Type="String">${
|
|
52
|
+
payload = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="135" ObjectPathId="134" /><Query Id="136" ObjectPathId="134"><Query SelectAllProperties="false"><Properties><Property Name="TotalUserCount" ScalarProperty="true" /><Property Name="UserCollectionPosition" ScalarProperty="true" /><Property Name="ExternalUserCollection"><Query SelectAllProperties="false"><Properties /></Query><ChildItemQuery SelectAllProperties="false"><Properties><Property Name="DisplayName" ScalarProperty="true" /><Property Name="InvitedAs" ScalarProperty="true" /><Property Name="UniqueId" ScalarProperty="true" /><Property Name="AcceptedAs" ScalarProperty="true" /><Property Name="WhenCreated" ScalarProperty="true" /><Property Name="InvitedBy" ScalarProperty="true" /></Properties></ChildItemQuery></Property></Properties></Query></Query></Actions><ObjectPaths><Method Id="134" ParentId="131" Name="GetExternalUsersForSite"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.siteUrl)}</Parameter><Parameter Type="Int32">${position}</Parameter><Parameter Type="Int32">${pageSize}</Parameter><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.filter || '')}</Parameter><Parameter Type="Enum">${sortOrder}</Parameter></Parameters></Method><Constructor Id="131" TypeId="{e45fd516-a408-4ca4-b6dc-268e2f1f0f83}" /></ObjectPaths></Request>`;
|
|
51
53
|
}
|
|
52
54
|
else {
|
|
53
|
-
payload = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="109" ObjectPathId="108" /><Query Id="110" ObjectPathId="108"><Query SelectAllProperties="false"><Properties><Property Name="TotalUserCount" ScalarProperty="true" /><Property Name="UserCollectionPosition" ScalarProperty="true" /><Property Name="ExternalUserCollection"><Query SelectAllProperties="false"><Properties /></Query><ChildItemQuery SelectAllProperties="false"><Properties><Property Name="DisplayName" ScalarProperty="true" /><Property Name="InvitedAs" ScalarProperty="true" /><Property Name="UniqueId" ScalarProperty="true" /><Property Name="AcceptedAs" ScalarProperty="true" /><Property Name="WhenCreated" ScalarProperty="true" /><Property Name="InvitedBy" ScalarProperty="true" /></Properties></ChildItemQuery></Property></Properties></Query></Query></Actions><ObjectPaths><Method Id="108" ParentId="105" Name="GetExternalUsers"><Parameters><Parameter Type="Int32">${position}</Parameter><Parameter Type="Int32">${pageSize}</Parameter><Parameter Type="String">${
|
|
55
|
+
payload = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="109" ObjectPathId="108" /><Query Id="110" ObjectPathId="108"><Query SelectAllProperties="false"><Properties><Property Name="TotalUserCount" ScalarProperty="true" /><Property Name="UserCollectionPosition" ScalarProperty="true" /><Property Name="ExternalUserCollection"><Query SelectAllProperties="false"><Properties /></Query><ChildItemQuery SelectAllProperties="false"><Properties><Property Name="DisplayName" ScalarProperty="true" /><Property Name="InvitedAs" ScalarProperty="true" /><Property Name="UniqueId" ScalarProperty="true" /><Property Name="AcceptedAs" ScalarProperty="true" /><Property Name="WhenCreated" ScalarProperty="true" /><Property Name="InvitedBy" ScalarProperty="true" /></Properties></ChildItemQuery></Property></Properties></Query></Query></Actions><ObjectPaths><Method Id="108" ParentId="105" Name="GetExternalUsers"><Parameters><Parameter Type="Int32">${position}</Parameter><Parameter Type="Int32">${pageSize}</Parameter><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.filter || '')}</Parameter><Parameter Type="Enum">${sortOrder}</Parameter></Parameters></Method><Constructor Id="105" TypeId="{e45fd516-a408-4ca4-b6dc-268e2f1f0f83}" /></ObjectPaths></Request>`;
|
|
54
56
|
}
|
|
55
57
|
const requestOptions = {
|
|
56
58
|
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
@@ -138,7 +140,7 @@ _SpoExternalUserListCommand_instances = new WeakSet(), _SpoExternalUserListComma
|
|
|
138
140
|
return `${args.options.sortOrder} is not a valid sortOrder value. Allowed values asc|desc`;
|
|
139
141
|
}
|
|
140
142
|
if (args.options.siteUrl) {
|
|
141
|
-
return
|
|
143
|
+
return validation_1.validation.isValidSharePointUrl(args.options.siteUrl);
|
|
142
144
|
}
|
|
143
145
|
return true;
|
|
144
146
|
}));
|
|
@@ -16,7 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoFeatureEnableCommand_instances, _SpoFeatureEnableCommand_initTelemetry, _SpoFeatureEnableCommand_initOptions, _SpoFeatureEnableCommand_initValidators, _SpoFeatureEnableCommand_initTypes;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
-
const
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
21
|
const commands_1 = require("../../commands");
|
|
22
22
|
class SpoFeatureEnableCommand extends SpoCommand_1.default {
|
|
@@ -88,7 +88,7 @@ _SpoFeatureEnableCommand_instances = new WeakSet(), _SpoFeatureEnableCommand_ini
|
|
|
88
88
|
return `${args.options.scope} is not a valid Feature scope. Allowed values are Site|Web`;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
return
|
|
91
|
+
return validation_1.validation.isValidSharePointUrl(args.options.url);
|
|
92
92
|
}));
|
|
93
93
|
}, _SpoFeatureEnableCommand_initTypes = function _SpoFeatureEnableCommand_initTypes() {
|
|
94
94
|
this.types.string.push('scope', 's');
|
|
@@ -16,7 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoFeatureListCommand_instances, _SpoFeatureListCommand_initTelemetry, _SpoFeatureListCommand_initOptions, _SpoFeatureListCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
-
const
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
21
|
const commands_1 = require("../../commands");
|
|
22
22
|
class SpoFeatureListCommand extends SpoCommand_1.default {
|
|
@@ -81,7 +81,7 @@ _SpoFeatureListCommand_instances = new WeakSet(), _SpoFeatureListCommand_initTel
|
|
|
81
81
|
return `${args.options.scope} is not a valid Feature scope. Allowed values are Site|Web`;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
return
|
|
84
|
+
return validation_1.validation.isValidSharePointUrl(args.options.url);
|
|
85
85
|
}));
|
|
86
86
|
};
|
|
87
87
|
module.exports = new SpoFeatureListCommand();
|
|
@@ -16,7 +16,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoFieldAddCommand_instances, _SpoFieldAddCommand_initTelemetry, _SpoFieldAddCommand_initOptions, _SpoFieldAddCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
-
const
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const spo_1 = require("../../../../utils/spo");
|
|
21
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
23
|
const commands_1 = require("../../commands");
|
|
22
24
|
class SpoFieldAddCommand extends SpoCommand_1.default {
|
|
@@ -36,9 +38,9 @@ class SpoFieldAddCommand extends SpoCommand_1.default {
|
|
|
36
38
|
commandAction(logger, args) {
|
|
37
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
40
|
try {
|
|
39
|
-
const reqDigest = yield
|
|
41
|
+
const reqDigest = yield spo_1.spo.getRequestDigest(args.options.webUrl);
|
|
40
42
|
const requestOptions = {
|
|
41
|
-
url: `${args.options.webUrl}/_api/web/${(args.options.listTitle ? `lists/getByTitle('${
|
|
43
|
+
url: `${args.options.webUrl}/_api/web/${(args.options.listTitle ? `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/` : '')}fields/CreateFieldAsXml`,
|
|
42
44
|
headers: {
|
|
43
45
|
'X-RequestDigest': reqDigest.FormDigestValue,
|
|
44
46
|
accept: 'application/json;odata=nometadata'
|
|
@@ -112,7 +114,7 @@ _SpoFieldAddCommand_instances = new WeakSet(), _SpoFieldAddCommand_initTelemetry
|
|
|
112
114
|
});
|
|
113
115
|
}, _SpoFieldAddCommand_initValidators = function _SpoFieldAddCommand_initValidators() {
|
|
114
116
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
const isValidSharePointUrl =
|
|
117
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
116
118
|
if (isValidSharePointUrl !== true) {
|
|
117
119
|
return isValidSharePointUrl;
|
|
118
120
|
}
|
|
@@ -16,7 +16,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoFieldGetCommand_instances, _SpoFieldGetCommand_initTelemetry, _SpoFieldGetCommand_initOptions, _SpoFieldGetCommand_initValidators, _SpoFieldGetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
-
const
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
23
|
const commands_1 = require("../../commands");
|
|
22
24
|
class SpoFieldGetCommand extends SpoCommand_1.default {
|
|
@@ -42,21 +44,21 @@ class SpoFieldGetCommand extends SpoCommand_1.default {
|
|
|
42
44
|
}
|
|
43
45
|
let listRestUrl = '';
|
|
44
46
|
if (args.options.listId) {
|
|
45
|
-
listRestUrl = `lists(guid'${
|
|
47
|
+
listRestUrl = `lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
46
48
|
}
|
|
47
49
|
else if (args.options.listTitle) {
|
|
48
|
-
listRestUrl = `lists/getByTitle('${
|
|
50
|
+
listRestUrl = `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
49
51
|
}
|
|
50
52
|
else if (args.options.listUrl) {
|
|
51
|
-
const listServerRelativeUrl =
|
|
52
|
-
listRestUrl = `GetList('${
|
|
53
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
54
|
+
listRestUrl = `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
53
55
|
}
|
|
54
56
|
let fieldRestUrl = '';
|
|
55
57
|
if (args.options.id) {
|
|
56
|
-
fieldRestUrl = `/getbyid('${
|
|
58
|
+
fieldRestUrl = `/getbyid('${formatting_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
57
59
|
}
|
|
58
60
|
else {
|
|
59
|
-
fieldRestUrl = `/getbyinternalnameortitle('${
|
|
61
|
+
fieldRestUrl = `/getbyinternalnameortitle('${formatting_1.formatting.encodeQueryParameter(args.options.title)}')`;
|
|
60
62
|
}
|
|
61
63
|
const requestOptions = {
|
|
62
64
|
url: `${args.options.webUrl}/_api/web/${listRestUrl}fields${fieldRestUrl}`,
|
|
@@ -103,14 +105,14 @@ _SpoFieldGetCommand_instances = new WeakSet(), _SpoFieldGetCommand_initTelemetry
|
|
|
103
105
|
});
|
|
104
106
|
}, _SpoFieldGetCommand_initValidators = function _SpoFieldGetCommand_initValidators() {
|
|
105
107
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
const isValidSharePointUrl =
|
|
108
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
107
109
|
if (isValidSharePointUrl !== true) {
|
|
108
110
|
return isValidSharePointUrl;
|
|
109
111
|
}
|
|
110
|
-
if (args.options.id && !
|
|
112
|
+
if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
|
|
111
113
|
return `${args.options.id} is not a valid GUID`;
|
|
112
114
|
}
|
|
113
|
-
if (args.options.listId && !
|
|
115
|
+
if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
|
|
114
116
|
return `${args.options.listId} is not a valid GUID`;
|
|
115
117
|
}
|
|
116
118
|
return true;
|
|
@@ -16,7 +16,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoFieldListCommand_instances, _SpoFieldListCommand_initTelemetry, _SpoFieldListCommand_initOptions, _SpoFieldListCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
-
const
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
21
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
23
|
const commands_1 = require("../../commands");
|
|
22
24
|
class SpoFieldListCommand extends SpoCommand_1.default {
|
|
@@ -40,14 +42,14 @@ class SpoFieldListCommand extends SpoCommand_1.default {
|
|
|
40
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
43
|
let listUrl = '';
|
|
42
44
|
if (args.options.listId) {
|
|
43
|
-
listUrl = `lists(guid'${
|
|
45
|
+
listUrl = `lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
44
46
|
}
|
|
45
47
|
else if (args.options.listTitle) {
|
|
46
|
-
listUrl = `lists/getByTitle('${
|
|
48
|
+
listUrl = `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
47
49
|
}
|
|
48
50
|
else if (args.options.listUrl) {
|
|
49
|
-
const listServerRelativeUrl =
|
|
50
|
-
listUrl = `GetList('${
|
|
51
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
52
|
+
listUrl = `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
51
53
|
}
|
|
52
54
|
const requestOptions = {
|
|
53
55
|
url: `${args.options.webUrl}/_api/web/${listUrl}fields`,
|
|
@@ -86,11 +88,11 @@ _SpoFieldListCommand_instances = new WeakSet(), _SpoFieldListCommand_initTelemet
|
|
|
86
88
|
});
|
|
87
89
|
}, _SpoFieldListCommand_initValidators = function _SpoFieldListCommand_initValidators() {
|
|
88
90
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
const isValidSharePointUrl =
|
|
91
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
90
92
|
if (isValidSharePointUrl !== true) {
|
|
91
93
|
return isValidSharePointUrl;
|
|
92
94
|
}
|
|
93
|
-
if (args.options.listId && !
|
|
95
|
+
if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
|
|
94
96
|
return `${args.options.listId} is not a valid GUID`;
|
|
95
97
|
}
|
|
96
98
|
const listOptions = [args.options.listId, args.options.listTitle, args.options.listUrl];
|
|
@@ -15,9 +15,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoFieldRemoveCommand_instances, _SpoFieldRemoveCommand_initTelemetry, _SpoFieldRemoveCommand_initOptions, _SpoFieldRemoveCommand_initValidators, _SpoFieldRemoveCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
|
-
const
|
|
20
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
21
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
22
|
+
const validation_1 = require("../../../../utils/validation");
|
|
21
23
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
22
24
|
const commands_1 = require("../../commands");
|
|
23
25
|
class SpoFieldRemoveCommand extends SpoCommand_1.default {
|
|
@@ -54,10 +56,10 @@ class SpoFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
54
56
|
}
|
|
55
57
|
let fieldRestUrl = '';
|
|
56
58
|
if (fieldId) {
|
|
57
|
-
fieldRestUrl = `/getbyid('${
|
|
59
|
+
fieldRestUrl = `/getbyid('${formatting_1.formatting.encodeQueryParameter(fieldId)}')`;
|
|
58
60
|
}
|
|
59
61
|
else {
|
|
60
|
-
fieldRestUrl = `/getbyinternalnameortitle('${
|
|
62
|
+
fieldRestUrl = `/getbyinternalnameortitle('${formatting_1.formatting.encodeQueryParameter(title)}')`;
|
|
61
63
|
}
|
|
62
64
|
const requestOptions = {
|
|
63
65
|
url: `${args.options.webUrl}/_api/web/${listRestUrl}fields${fieldRestUrl}`,
|
|
@@ -74,14 +76,14 @@ class SpoFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
74
76
|
const prepareRemoval = () => __awaiter(this, void 0, void 0, function* () {
|
|
75
77
|
let listRestUrl = '';
|
|
76
78
|
if (args.options.listId) {
|
|
77
|
-
listRestUrl = `lists(guid'${
|
|
79
|
+
listRestUrl = `lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
78
80
|
}
|
|
79
81
|
else if (args.options.listTitle) {
|
|
80
|
-
listRestUrl = `lists/getByTitle('${
|
|
82
|
+
listRestUrl = `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
81
83
|
}
|
|
82
84
|
else if (args.options.listUrl) {
|
|
83
|
-
const listServerRelativeUrl =
|
|
84
|
-
listRestUrl = `GetList('${
|
|
85
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
86
|
+
listRestUrl = `GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
85
87
|
}
|
|
86
88
|
if (args.options.group) {
|
|
87
89
|
if (this.verbose) {
|
|
@@ -125,7 +127,7 @@ class SpoFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
125
127
|
}
|
|
126
128
|
else {
|
|
127
129
|
const confirmMessage = `Are you sure you want to remove the ${args.options.group ? 'fields' : 'field'} ${args.options.id || args.options.title || 'from group ' + args.options.group} ${messageEnd}?`;
|
|
128
|
-
const result = yield
|
|
130
|
+
const result = yield Cli_1.Cli.prompt({
|
|
129
131
|
type: 'confirm',
|
|
130
132
|
name: 'continue',
|
|
131
133
|
default: false,
|
|
@@ -172,14 +174,14 @@ _SpoFieldRemoveCommand_instances = new WeakSet(), _SpoFieldRemoveCommand_initTel
|
|
|
172
174
|
});
|
|
173
175
|
}, _SpoFieldRemoveCommand_initValidators = function _SpoFieldRemoveCommand_initValidators() {
|
|
174
176
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
-
const isValidSharePointUrl =
|
|
177
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
176
178
|
if (isValidSharePointUrl !== true) {
|
|
177
179
|
return isValidSharePointUrl;
|
|
178
180
|
}
|
|
179
|
-
if (args.options.id && !
|
|
181
|
+
if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
|
|
180
182
|
return `${args.options.id} is not a valid GUID`;
|
|
181
183
|
}
|
|
182
|
-
if (args.options.listId && !
|
|
184
|
+
if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
|
|
183
185
|
return `${args.options.listId} is not a valid GUID`;
|
|
184
186
|
}
|
|
185
187
|
return true;
|