@pnp/cli-microsoft365 7.2.0-beta.f440e15 → 7.3.0-beta.01256d2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/Dockerfile +0 -1
- package/.eslintrc.cjs +2 -0
- package/Dockerfile +0 -1
- package/allCommands.json +1 -0
- package/allCommandsFull.json +1 -0
- package/dist/Auth.js +1 -1
- package/dist/Command.js +18 -28
- package/dist/api.js +5 -7
- package/dist/appInsights.js +2 -1
- package/dist/chili/chili.js +40 -51
- package/dist/cli/Cli.js +133 -142
- package/dist/cli/timings.js +9 -0
- package/dist/index.js +1 -15
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-add.js +3 -3
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-get.js +2 -15
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-remove.js +5 -22
- package/dist/m365/aad/commands/app/app-remove.js +2 -7
- package/dist/m365/aad/commands/app/app-role-remove.js +2 -7
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +2 -7
- package/dist/m365/aad/commands/group/group-list.js +69 -1
- package/dist/m365/aad/commands/group/group-remove.js +2 -7
- package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +2 -7
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-clear.js +2 -7
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +2 -7
- package/dist/m365/aad/commands/m365group/m365group-remove.js +2 -7
- package/dist/m365/aad/commands/m365group/m365group-user-remove.js +2 -7
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -7
- package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -7
- package/dist/m365/aad/commands/user/user-license-remove.js +2 -7
- package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +2 -7
- package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +2 -7
- package/dist/m365/aad/commands/user/user-remove.js +2 -7
- package/dist/m365/cli/commands/config/config-set.js +13 -0
- package/dist/m365/commands/login.js +12 -8
- package/dist/m365/commands/setup.js +31 -37
- package/dist/m365/context/commands/context-remove.js +2 -7
- package/dist/m365/context/commands/option/option-remove.js +2 -7
- package/dist/m365/{search/commands/externalconnection/externalconnection-add.js → external/commands/connection/connection-add.js} +16 -13
- package/dist/m365/external/commands/connection/connection-doctor.js +424 -0
- package/dist/m365/{search/commands/externalconnection/externalconnection-get.js → external/commands/connection/connection-get.js} +16 -13
- package/dist/m365/{search/commands/externalconnection/externalconnection-list.js → external/commands/connection/connection-list.js} +7 -4
- package/dist/m365/{search/commands/externalconnection/externalconnection-remove.js → external/commands/connection/connection-remove.js} +19 -21
- package/dist/m365/{search/commands/externalconnection/externalconnection-schema-add.js → external/commands/connection/connection-schema-add.js} +14 -11
- package/dist/m365/external/commands/item/item-add.js +144 -0
- package/dist/m365/external/commands.js +17 -0
- package/dist/m365/flow/commands/environment/environment-list.js +6 -4
- package/dist/m365/flow/commands/flow-remove.js +2 -7
- package/dist/m365/flow/commands/owner/owner-remove.js +2 -7
- package/dist/m365/flow/commands/run/run-cancel.js +2 -7
- package/dist/m365/flow/commands/run/run-resubmit.js +2 -7
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +2 -7
- package/dist/m365/pa/commands/app/app-consent-set.js +2 -7
- package/dist/m365/pa/commands/app/app-permission-remove.js +2 -7
- package/dist/m365/pa/commands/app/app-remove.js +2 -7
- package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -7
- package/dist/m365/planner/commands/plan/plan-remove.js +2 -7
- package/dist/m365/planner/commands/roster/roster-member-remove.js +4 -14
- package/dist/m365/planner/commands/roster/roster-remove.js +2 -7
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +2 -7
- package/dist/m365/planner/commands/task/task-reference-remove.js +2 -7
- package/dist/m365/planner/commands/task/task-remove.js +2 -7
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +2 -7
- package/dist/m365/pp/commands/card/card-remove.js +2 -7
- package/dist/m365/pp/commands/chatbot/chatbot-remove.js +2 -7
- package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +2 -7
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +2 -7
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +2 -7
- package/dist/m365/pp/commands/solution/solution-remove.js +2 -7
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +2 -7
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +2 -7
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +2 -7
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +4 -4
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.1-rc.0.js → doctor-1.18.1.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.2.js +21 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +6 -3
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +17 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.1-rc.0.js → upgrade-1.18.1.js} +26 -26
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.18.2.js +53 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +18 -17
- package/dist/m365/spfx/commands/spfx-doctor.js +16 -1
- package/dist/m365/spo/commands/app/app-remove.js +2 -7
- package/dist/m365/spo/commands/app/app-retract.js +2 -7
- package/dist/m365/spo/commands/app/app-uninstall.js +2 -7
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +2 -7
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +2 -7
- package/dist/m365/spo/commands/commandset/commandset-remove.js +2 -7
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +2 -7
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +2 -2
- package/dist/m365/spo/commands/customaction/customaction-clear.js +2 -7
- package/dist/m365/spo/commands/customaction/customaction-remove.js +2 -7
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +2 -7
- package/dist/m365/spo/commands/field/field-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-checkout-undo.js +2 -7
- package/dist/m365/spo/commands/file/file-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +14 -23
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +21 -34
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +2 -7
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +2 -7
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-version-clear.js +2 -7
- package/dist/m365/spo/commands/file/file-version-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-version-restore.js +2 -7
- package/dist/m365/spo/commands/folder/folder-remove.js +2 -7
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +9 -29
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +11 -35
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +2 -7
- package/dist/m365/spo/commands/group/group-member-remove.js +2 -7
- package/dist/m365/spo/commands/group/group-remove.js +2 -7
- package/dist/m365/spo/commands/homesite/homesite-remove.js +2 -7
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +2 -7
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +2 -7
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +2 -7
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-retentionlabel-ensure.js +27 -37
- package/dist/m365/spo/commands/list/list-retentionlabel-remove.js +8 -26
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +2 -7
- package/dist/m365/spo/commands/list/list-view-field-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-view-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-webhook-remove.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +5 -0
- package/dist/m365/spo/commands/listitem/listitem-remove.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +36 -37
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +38 -39
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +2 -7
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +2 -7
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +2 -7
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +2 -7
- package/dist/m365/spo/commands/page/page-remove.js +2 -7
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +2 -7
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +2 -7
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +49 -12
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +2 -7
- package/dist/m365/spo/commands/site/site-add.js +45 -12
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +2 -7
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +2 -7
- package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +2 -7
- package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +2 -7
- package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +2 -7
- package/dist/m365/spo/commands/site/site-remove.js +2 -7
- package/dist/m365/spo/commands/site/site-set.js +33 -1
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +2 -7
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +2 -7
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +2 -7
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +8 -2
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +2 -7
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +2 -7
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +2 -7
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +2 -7
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +2 -7
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +19 -2
- package/dist/m365/spo/commands/theme/theme-remove.js +2 -7
- package/dist/m365/spo/commands/user/user-remove.js +2 -7
- package/dist/m365/spo/commands/web/web-remove.js +2 -7
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +2 -7
- package/dist/m365/teams/commands/app/app-remove.js +2 -7
- package/dist/m365/teams/commands/app/app-uninstall.js +2 -7
- package/dist/m365/teams/commands/cache/cache-remove.js +2 -7
- package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -7
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -7
- package/dist/m365/teams/commands/chat/chat-member-remove.js +2 -7
- package/dist/m365/teams/commands/meeting/meeting-add.js +151 -0
- package/dist/m365/teams/commands/tab/tab-remove.js +2 -7
- package/dist/m365/teams/commands/team/team-remove.js +2 -7
- package/dist/m365/teams/commands/user/user-app-remove.js +51 -12
- package/dist/m365/teams/commands.js +2 -1
- package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +131 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-get.js +75 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-list.js +53 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +79 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +118 -0
- package/dist/m365/tenant/commands/people/profileCardProperties.js +24 -0
- package/dist/m365/tenant/commands.js +5 -0
- package/dist/m365/todo/commands/list/list-remove.js +2 -7
- package/dist/m365/todo/commands/task/task-remove.js +2 -7
- package/dist/m365/yammer/commands/group/group-user-remove.js +2 -7
- package/dist/m365/yammer/commands/message/message-like-set.js +3 -8
- package/dist/m365/yammer/commands/message/message-remove.js +2 -7
- package/dist/request.js +6 -0
- package/dist/settingsNames.js +2 -0
- package/dist/telemetry.js +0 -8
- package/dist/utils/aadAdministrativeUnit.js +25 -0
- package/dist/utils/prompt.js +30 -7
- package/dist/utils/spo.js +109 -0
- package/dist/utils/validation.js +5 -2
- package/docs/docs/_clisettings.mdx +2 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-add.mdx +6 -2
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-get.mdx +5 -1
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-list.mdx +5 -1
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-remove.mdx +6 -2
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.mdx +1 -1
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.mdx +2 -2
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/aad/group/group-list.mdx +11 -0
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-add.mdx +1 -1
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-list.mdx +2 -2
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-remove.mdx +2 -2
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-set.mdx +2 -2
- package/docs/docs/cmd/aad/policy/policy-list.mdx +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-disable.mdx +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-enable.mdx +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-get.mdx +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-set.mdx +1 -1
- package/docs/docs/cmd/aad/sp/sp-add.mdx +2 -2
- package/docs/docs/cmd/aad/sp/sp-get.mdx +2 -2
- package/docs/docs/cmd/aad/user/user-add.mdx +3 -3
- package/docs/docs/cmd/aad/user/user-guest-add.mdx +1 -1
- package/docs/docs/cmd/aad/user/user-set.mdx +3 -3
- package/docs/docs/cmd/{search/externalconnection/externalconnection-add.mdx → external/connection/connection-add.mdx} +16 -10
- package/docs/docs/cmd/external/connection/connection-doctor.mdx +179 -0
- package/docs/docs/cmd/{search/externalconnection/externalconnection-get.mdx → external/connection/connection-get.mdx} +16 -11
- package/docs/docs/cmd/{search/externalconnection/externalconnection-list.mdx → external/connection/connection-list.mdx} +12 -7
- package/docs/docs/cmd/external/connection/connection-remove.mdx +54 -0
- package/docs/docs/cmd/external/connection/connection-schema-add.mdx +41 -0
- package/docs/docs/cmd/external/item/item-add.mdx +145 -0
- package/docs/docs/cmd/flow/run/run-cancel.mdx +3 -0
- package/docs/docs/cmd/graph/changelog/changelog-list.mdx +5 -5
- package/docs/docs/cmd/login.mdx +1 -1
- package/docs/docs/cmd/onedrive/report/report-activityfilecounts.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-activityusercounts.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-activityuserdetail.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-usageaccountcounts.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-usageaccountdetail.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-usagefilecounts.mdx +0 -3
- package/docs/docs/cmd/onedrive/report/report-usagestorage.mdx +0 -3
- package/docs/docs/cmd/onenote/notebook/notebook-list.mdx +1 -1
- package/docs/docs/cmd/outlook/message/message-list.mdx +1 -1
- package/docs/docs/cmd/outlook/message/message-move.mdx +1 -1
- package/docs/docs/cmd/outlook/report/report-mailactivitycounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailactivityusercounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailactivityuserdetail.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailappusageappsusercounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailappusageusercounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailappusageuserdetail.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailappusageversionsusercounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailboxusagedetail.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailboxusagemailboxcount.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailboxusagequotastatusmailboxcounts.mdx +0 -3
- package/docs/docs/cmd/outlook/report/report-mailboxusagestorage.mdx +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-add.mdx +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-set.mdx +1 -1
- package/docs/docs/cmd/planner/plan/plan-set.mdx +3 -3
- package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
- package/docs/docs/cmd/purview/auditlog/auditlog-list.mdx +3 -3
- package/docs/docs/cmd/purview/retentionevent/retentionevent-add.mdx +1 -1
- package/docs/docs/cmd/purview/retentionevent/retentionevent-get.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.mdx +1 -1
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +4 -4
- package/docs/docs/cmd/skype/report/report-activitycounts.mdx +0 -2
- package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +0 -3
- package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +0 -3
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-add.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-deploy.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-get.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-install.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-list.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-remove.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-retract.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-uninstall.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-add.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-rename.mdx +2 -0
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.mdx +1 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.mdx +1 -1
- package/docs/docs/cmd/spo/report/report-activityfilecounts.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-activitypages.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-activityusercounts.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-activityuserdetail.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagedetail.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagefilecounts.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagepages.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagesitecounts.mdx +0 -3
- package/docs/docs/cmd/spo/report/report-siteusagestorage.mdx +0 -3
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.mdx +10 -1
- package/docs/docs/cmd/spo/site/site-add.mdx +25 -4
- package/docs/docs/cmd/spo/site/site-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-groupify.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-set.mdx +15 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-add.mdx +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-apply.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-get.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-remove.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-status-get.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-set.mdx +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.mdx +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-add.mdx +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +73 -3
- package/docs/docs/cmd/spo/sitescript/sitescript-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-remove.mdx +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-set.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-apply.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-get.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-list.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-remove.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-remove.mdx +1 -1
- package/docs/docs/cmd/spo/web/web-set.mdx +1 -1
- package/docs/docs/cmd/teams/channel/channel-remove.mdx +1 -1
- package/docs/docs/cmd/teams/meeting/meeting-add.mdx +283 -0
- package/docs/docs/cmd/teams/meeting/meeting-get.mdx +1 -1
- package/docs/docs/cmd/teams/meeting/meeting-transcript-list.mdx +1 -1
- package/docs/docs/cmd/teams/report/report-deviceusagedistributionusercounts.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-deviceusageusercounts.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-deviceusageuserdetail.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-pstncalls.mdx +1 -1
- package/docs/docs/cmd/teams/report/report-useractivitycounts.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-useractivityusercounts.mdx +0 -3
- package/docs/docs/cmd/teams/report/report-useractivityuserdetail.mdx +0 -3
- package/docs/docs/cmd/teams/tab/tab-remove.mdx +1 -1
- package/docs/docs/cmd/teams/team/team-remove.mdx +1 -1
- package/docs/docs/cmd/teams/user/user-app-remove.mdx +23 -5
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-add.mdx +126 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-get.mdx +101 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-list.mdx +98 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +61 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +120 -0
- package/docs/docs/cmd/tenant/report/report-activeusercounts.mdx +0 -3
- package/docs/docs/cmd/tenant/report/report-activeuserdetail.mdx +0 -3
- package/docs/docs/cmd/tenant/report/report-servicesusercounts.mdx +0 -3
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.mdx +1 -1
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.mdx +1 -1
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.mdx +1 -1
- package/docs/docs/cmd/todo/task/task-set.mdx +1 -1
- package/docs/docs/cmd/yammer/report/report-activitycounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-activityusercounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-activityuserdetail.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-deviceusagedistributionusercounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-deviceusageusercounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-deviceusageuserdetail.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-groupsactivitycounts.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-groupsactivitydetail.mdx +0 -3
- package/docs/docs/cmd/yammer/report/report-groupsactivitygroupcounts.mdx +0 -3
- package/npm-shrinkwrap.json +609 -569
- package/package.json +37 -37
- package/dist/m365/search/commands.js +0 -9
- package/docs/docs/cmd/search/externalconnection/externalconnection-remove.mdx +0 -48
- package/docs/docs/cmd/search/externalconnection/externalconnection-schema-add.mdx +0 -35
|
@@ -57,13 +57,8 @@ class SpoKnowledgehubRemoveCommand extends SpoCommand {
|
|
|
57
57
|
await removeKnowledgehub();
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
|
-
const result = await Cli.
|
|
61
|
-
|
|
62
|
-
name: 'continue',
|
|
63
|
-
default: false,
|
|
64
|
-
message: `Are you sure you want to remove Knowledge Hub Site from your tenant?`
|
|
65
|
-
});
|
|
66
|
-
if (result.continue) {
|
|
60
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove Knowledge Hub Site from your tenant?` });
|
|
61
|
+
if (result) {
|
|
67
62
|
await removeKnowledgehub();
|
|
68
63
|
}
|
|
69
64
|
}
|
|
@@ -64,13 +64,8 @@ class SpoListContentTypeRemoveCommand extends SpoCommand {
|
|
|
64
64
|
await removeContentTypeFromList();
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
|
-
const result = await Cli.
|
|
68
|
-
|
|
69
|
-
name: 'continue',
|
|
70
|
-
default: false,
|
|
71
|
-
message: `Are you sure you want to remove the content type ${args.options.id} from the list ${args.options.listId ? args.options.listId : args.options.listTitle ? args.options.listTitle : args.options.listUrl} in site ${args.options.webUrl}?`
|
|
72
|
-
});
|
|
73
|
-
if (result.continue) {
|
|
67
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the content type ${args.options.id} from the list ${args.options.listId ? args.options.listId : args.options.listTitle ? args.options.listTitle : args.options.listUrl} in site ${args.options.webUrl}?` });
|
|
68
|
+
if (result) {
|
|
74
69
|
await removeContentTypeFromList();
|
|
75
70
|
}
|
|
76
71
|
}
|
|
@@ -58,13 +58,8 @@ class SpoListRemoveCommand extends SpoCommand {
|
|
|
58
58
|
await removeList();
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
|
-
const result = await Cli.
|
|
62
|
-
|
|
63
|
-
name: 'continue',
|
|
64
|
-
default: false,
|
|
65
|
-
message: `Are you sure you want to remove the list ${args.options.id || args.options.title} from site ${args.options.webUrl}?`
|
|
66
|
-
});
|
|
67
|
-
if (result.continue) {
|
|
61
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the list ${args.options.id || args.options.title} from site ${args.options.webUrl}?` });
|
|
62
|
+
if (result) {
|
|
68
63
|
await removeList();
|
|
69
64
|
}
|
|
70
65
|
}
|
|
@@ -6,6 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _SpoListRetentionLabelEnsureCommand_instances, _SpoListRetentionLabelEnsureCommand_initTelemetry, _SpoListRetentionLabelEnsureCommand_initOptions, _SpoListRetentionLabelEnsureCommand_initValidators, _SpoListRetentionLabelEnsureCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { spo } from '../../../../utils/spo.js';
|
|
9
10
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
10
11
|
import { validation } from '../../../../utils/validation.js';
|
|
11
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -27,49 +28,38 @@ class SpoListRetentionLabelEnsureCommand extends SpoCommand {
|
|
|
27
28
|
}
|
|
28
29
|
async commandAction(logger, args) {
|
|
29
30
|
try {
|
|
30
|
-
|
|
31
|
-
let listServerRelativeUrl = '';
|
|
32
|
-
if (args.options.listUrl) {
|
|
33
|
-
const listServerRelativeUrlFromPath = urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
34
|
-
listServerRelativeUrl = listServerRelativeUrlFromPath;
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
if (args.options.listId) {
|
|
38
|
-
listRestUrl = `lists(guid'${formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
listRestUrl = `lists/getByTitle('${formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
42
|
-
}
|
|
43
|
-
const requestOptions = {
|
|
44
|
-
url: `${args.options.webUrl}/_api/web/${listRestUrl}?$expand=RootFolder&$select=RootFolder`,
|
|
45
|
-
headers: {
|
|
46
|
-
'accept': 'application/json;odata=nometadata'
|
|
47
|
-
},
|
|
48
|
-
responseType: 'json'
|
|
49
|
-
};
|
|
50
|
-
const listInstance = await request.get(requestOptions);
|
|
51
|
-
listServerRelativeUrl = listInstance.RootFolder.ServerRelativeUrl;
|
|
52
|
-
}
|
|
31
|
+
const listServerRelativeUrl = await this.getListServerRelativeUrl(args, logger);
|
|
53
32
|
const listAbsoluteUrl = urlUtil.getAbsoluteUrl(args.options.webUrl, listServerRelativeUrl);
|
|
54
|
-
|
|
55
|
-
const requestOptions = {
|
|
56
|
-
url: requestUrl,
|
|
57
|
-
headers: {
|
|
58
|
-
'accept': 'application/json;odata=nometadata'
|
|
59
|
-
},
|
|
60
|
-
data: {
|
|
61
|
-
listUrl: listAbsoluteUrl,
|
|
62
|
-
complianceTagValue: args.options.name,
|
|
63
|
-
syncToItems: args.options.syncToItems || false
|
|
64
|
-
},
|
|
65
|
-
responseType: 'json'
|
|
66
|
-
};
|
|
67
|
-
await request.post(requestOptions);
|
|
33
|
+
await spo.applyDefaultRetentionLabelToList(args.options.webUrl, args.options.name, listAbsoluteUrl, args.options.syncToItems, logger, args.options.verbose);
|
|
68
34
|
}
|
|
69
35
|
catch (err) {
|
|
70
36
|
this.handleRejectedODataJsonPromise(err);
|
|
71
37
|
}
|
|
72
38
|
}
|
|
39
|
+
async getListServerRelativeUrl(args, logger) {
|
|
40
|
+
if (this.verbose) {
|
|
41
|
+
logger.logToStderr('Getting the list server relative URL');
|
|
42
|
+
}
|
|
43
|
+
if (args.options.listUrl) {
|
|
44
|
+
return urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
45
|
+
}
|
|
46
|
+
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
47
|
+
if (args.options.listId) {
|
|
48
|
+
requestUrl += `lists(guid'${formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
requestUrl += `lists/getByTitle('${formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
52
|
+
}
|
|
53
|
+
const requestOptions = {
|
|
54
|
+
url: `${requestUrl}?$expand=RootFolder&$select=RootFolder/ServerRelativeUrl`,
|
|
55
|
+
headers: {
|
|
56
|
+
'accept': 'application/json;odata=nometadata'
|
|
57
|
+
},
|
|
58
|
+
responseType: 'json'
|
|
59
|
+
};
|
|
60
|
+
const listInstance = await request.get(requestOptions);
|
|
61
|
+
return listInstance.RootFolder.ServerRelativeUrl;
|
|
62
|
+
}
|
|
73
63
|
}
|
|
74
64
|
_SpoListRetentionLabelEnsureCommand_instances = new WeakSet(), _SpoListRetentionLabelEnsureCommand_initTelemetry = function _SpoListRetentionLabelEnsureCommand_initTelemetry() {
|
|
75
65
|
this.telemetry.push((args) => {
|
|
@@ -11,6 +11,7 @@ import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
|
+
import { spo } from '../../../../utils/spo.js';
|
|
14
15
|
class SpoListRetentionLabelRemoveCommand extends SpoCommand {
|
|
15
16
|
get name() {
|
|
16
17
|
return commands.LIST_RETENTIONLABEL_REMOVE;
|
|
@@ -31,13 +32,8 @@ class SpoListRetentionLabelRemoveCommand extends SpoCommand {
|
|
|
31
32
|
await this.removeListRetentionLabel(logger, args);
|
|
32
33
|
}
|
|
33
34
|
else {
|
|
34
|
-
const result = await Cli.
|
|
35
|
-
|
|
36
|
-
name: 'continue',
|
|
37
|
-
default: false,
|
|
38
|
-
message: `Are you sure you want to remove the retention label from list '${args.options.listId || args.options.listTitle || args.options.listUrl}'?`
|
|
39
|
-
});
|
|
40
|
-
if (result.continue) {
|
|
35
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the retention label from list '${args.options.listId || args.options.listTitle || args.options.listUrl}'?` });
|
|
36
|
+
if (result) {
|
|
41
37
|
await this.removeListRetentionLabel(logger, args);
|
|
42
38
|
}
|
|
43
39
|
}
|
|
@@ -49,21 +45,7 @@ class SpoListRetentionLabelRemoveCommand extends SpoCommand {
|
|
|
49
45
|
try {
|
|
50
46
|
const listServerRelativeUrl = await this.getListServerRelativeUrl(args, logger);
|
|
51
47
|
const listAbsoluteUrl = urlUtil.getAbsoluteUrl(args.options.webUrl, listServerRelativeUrl);
|
|
52
|
-
|
|
53
|
-
url: `${args.options.webUrl}/_api/SP_CompliancePolicy_SPPolicyStoreProxy_SetListComplianceTag`,
|
|
54
|
-
headers: {
|
|
55
|
-
'accept': 'application/json;odata=nometadata'
|
|
56
|
-
},
|
|
57
|
-
data: {
|
|
58
|
-
listUrl: listAbsoluteUrl,
|
|
59
|
-
complianceTagValue: '',
|
|
60
|
-
blockDelete: false,
|
|
61
|
-
blockEdit: false,
|
|
62
|
-
syncToItems: false
|
|
63
|
-
},
|
|
64
|
-
responseType: 'json'
|
|
65
|
-
};
|
|
66
|
-
await request.post(requestOptions);
|
|
48
|
+
await spo.removeDefaultRetentionLabelFromList(args.options.webUrl, listAbsoluteUrl, logger, args.options.verbose);
|
|
67
49
|
}
|
|
68
50
|
catch (err) {
|
|
69
51
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -76,15 +58,15 @@ class SpoListRetentionLabelRemoveCommand extends SpoCommand {
|
|
|
76
58
|
if (args.options.listUrl) {
|
|
77
59
|
return urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
78
60
|
}
|
|
79
|
-
let
|
|
61
|
+
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
80
62
|
if (args.options.listId) {
|
|
81
|
-
|
|
63
|
+
requestUrl += `lists(guid'${formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
82
64
|
}
|
|
83
65
|
else {
|
|
84
|
-
|
|
66
|
+
requestUrl += `lists/getByTitle('${formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
85
67
|
}
|
|
86
68
|
const requestOptions = {
|
|
87
|
-
url: `${
|
|
69
|
+
url: `${requestUrl}?$expand=RootFolder&$select=RootFolder/ServerRelativeUrl`,
|
|
88
70
|
headers: {
|
|
89
71
|
'accept': 'application/json;odata=nometadata'
|
|
90
72
|
},
|
|
@@ -65,13 +65,8 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
65
65
|
await removeRoleAssignment();
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
|
-
const result = await Cli.
|
|
69
|
-
|
|
70
|
-
name: 'continue',
|
|
71
|
-
default: false,
|
|
72
|
-
message: `Are you sure you want to remove role assignment from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?`
|
|
73
|
-
});
|
|
74
|
-
if (result.continue) {
|
|
68
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove role assignment from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?` });
|
|
69
|
+
if (result) {
|
|
75
70
|
await removeRoleAssignment();
|
|
76
71
|
}
|
|
77
72
|
}
|
|
@@ -66,13 +66,8 @@ class SpoListRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
66
66
|
await breakListRoleInheritance();
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
|
-
const result = await Cli.
|
|
70
|
-
|
|
71
|
-
name: 'continue',
|
|
72
|
-
default: false,
|
|
73
|
-
message: `Are you sure you want to break the role inheritance of ${args.options.listId ?? args.options.listTitle}?`
|
|
74
|
-
});
|
|
75
|
-
if (result.continue) {
|
|
69
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to break the role inheritance of ${args.options.listId ?? args.options.listTitle}?` });
|
|
70
|
+
if (result) {
|
|
76
71
|
await breakListRoleInheritance();
|
|
77
72
|
}
|
|
78
73
|
}
|
|
@@ -62,13 +62,8 @@ class SpoListRoleInheritanceResetCommand extends SpoCommand {
|
|
|
62
62
|
await resetListRoleInheritance();
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
-
const result = await Cli.
|
|
66
|
-
|
|
67
|
-
name: 'continue',
|
|
68
|
-
default: false,
|
|
69
|
-
message: `Are you sure you want to reset the role inheritance of ${args.options.listId ?? args.options.listTitle}?`
|
|
70
|
-
});
|
|
71
|
-
if (result.continue) {
|
|
65
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to reset the role inheritance of ${args.options.listId ?? args.options.listTitle}?` });
|
|
66
|
+
if (result) {
|
|
72
67
|
await resetListRoleInheritance();
|
|
73
68
|
}
|
|
74
69
|
}
|
|
@@ -67,13 +67,8 @@ class SpoListViewFieldRemoveCommand extends SpoCommand {
|
|
|
67
67
|
await removeFieldFromView();
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
|
-
const result = await Cli.
|
|
71
|
-
|
|
72
|
-
name: 'continue',
|
|
73
|
-
default: false,
|
|
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
|
-
});
|
|
76
|
-
if (result.continue) {
|
|
70
|
+
const result = await Cli.promptForConfirmation({ 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}?` });
|
|
71
|
+
if (result) {
|
|
77
72
|
await removeFieldFromView();
|
|
78
73
|
}
|
|
79
74
|
}
|
|
@@ -65,13 +65,8 @@ class SpoListViewRemoveCommand extends SpoCommand {
|
|
|
65
65
|
await removeViewFromList();
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
|
-
const result = await Cli.
|
|
69
|
-
|
|
70
|
-
name: 'continue',
|
|
71
|
-
default: false,
|
|
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 || args.options.listUrl} in site ${args.options.webUrl}?`
|
|
73
|
-
});
|
|
74
|
-
if (result.continue) {
|
|
68
|
+
const result = await Cli.promptForConfirmation({ 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 || args.options.listUrl} in site ${args.options.webUrl}?` });
|
|
69
|
+
if (result) {
|
|
75
70
|
await removeViewFromList();
|
|
76
71
|
}
|
|
77
72
|
}
|
|
@@ -63,13 +63,8 @@ class SpoListWebhookRemoveCommand extends SpoCommand {
|
|
|
63
63
|
await removeWebhook();
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
const result = await Cli.
|
|
67
|
-
|
|
68
|
-
name: 'continue',
|
|
69
|
-
default: false,
|
|
70
|
-
message: `Are you sure you want to remove webhook ${args.options.id} from list ${args.options.listTitle || args.options.listId || args.options.listUrl} located at site ${args.options.webUrl}?`
|
|
71
|
-
});
|
|
72
|
-
if (result.continue) {
|
|
66
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove webhook ${args.options.id} from list ${args.options.listTitle || args.options.listId || args.options.listUrl} located at site ${args.options.webUrl}?` });
|
|
67
|
+
if (result) {
|
|
73
68
|
await removeWebhook();
|
|
74
69
|
}
|
|
75
70
|
}
|
|
@@ -63,13 +63,8 @@ class SpoListItemAttachmentRemoveCommand extends SpoCommand {
|
|
|
63
63
|
await removeListItemAttachment();
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
const result = await Cli.
|
|
67
|
-
|
|
68
|
-
name: 'continue',
|
|
69
|
-
default: false,
|
|
70
|
-
message: `Are you sure you want to remove the attachment ${args.options.fileName} of item with id ${args.options.listItemId} from the list ${args.options.listId ? args.options.listId : args.options.listTitle ? args.options.listTitle : args.options.listUrl} in site ${args.options.webUrl}?`
|
|
71
|
-
});
|
|
72
|
-
if (result.continue) {
|
|
66
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the attachment ${args.options.fileName} of item with id ${args.options.listItemId} from the list ${args.options.listId ? args.options.listId : args.options.listTitle ? args.options.listTitle : args.options.listUrl} in site ${args.options.webUrl}?` });
|
|
67
|
+
if (result) {
|
|
73
68
|
await removeListItemAttachment();
|
|
74
69
|
}
|
|
75
70
|
}
|
|
@@ -111,6 +111,11 @@ class SpoListItemBatchAddCommand extends SpoCommand {
|
|
|
111
111
|
.filter((line) => line.startsWith('{'))
|
|
112
112
|
.forEach((line, index) => {
|
|
113
113
|
const parsedResponse = JSON.parse(line);
|
|
114
|
+
if (parsedResponse.error) {
|
|
115
|
+
// if an error object is returned, the request failed
|
|
116
|
+
const error = parsedResponse.error;
|
|
117
|
+
throw error.message.value;
|
|
118
|
+
}
|
|
114
119
|
parsedResponse.value.forEach((fieldValueResult) => {
|
|
115
120
|
batchResults.push({
|
|
116
121
|
csvLineNumber: (index + 2),
|
|
@@ -68,13 +68,8 @@ class SpoListItemRemoveCommand extends SpoCommand {
|
|
|
68
68
|
await removeListItem();
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
|
-
const result = await Cli.
|
|
72
|
-
|
|
73
|
-
name: 'continue',
|
|
74
|
-
default: false,
|
|
75
|
-
message: `Are you sure you want to ${args.options.recycle ? "recycle" : "remove"} the list item ${args.options.id} from list ${args.options.listId || args.options.listTitle || args.options.listUrl} located in site ${args.options.webUrl}?`
|
|
76
|
-
});
|
|
77
|
-
if (result.continue) {
|
|
71
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to ${args.options.recycle ? "recycle" : "remove"} the list item ${args.options.id} from list ${args.options.listId || args.options.listTitle || args.options.listUrl} located in site ${args.options.webUrl}?` });
|
|
72
|
+
if (result) {
|
|
78
73
|
await removeListItem();
|
|
79
74
|
}
|
|
80
75
|
}
|
|
@@ -4,14 +4,15 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _SpoListItemRetentionLabelEnsureCommand_instances, _SpoListItemRetentionLabelEnsureCommand_initTelemetry, _SpoListItemRetentionLabelEnsureCommand_initOptions, _SpoListItemRetentionLabelEnsureCommand_initValidators, _SpoListItemRetentionLabelEnsureCommand_initOptionSets;
|
|
7
|
-
import
|
|
7
|
+
import * as url from 'url';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
|
-
import
|
|
14
|
+
import { spo } from '../../../../utils/spo.js';
|
|
15
|
+
import { odata } from '../../../../utils/odata.js';
|
|
15
16
|
class SpoListItemRetentionLabelEnsureCommand extends SpoCommand {
|
|
16
17
|
get name() {
|
|
17
18
|
return commands.LISTITEM_RETENTIONLABEL_ENSURE;
|
|
@@ -29,68 +30,66 @@ class SpoListItemRetentionLabelEnsureCommand extends SpoCommand {
|
|
|
29
30
|
}
|
|
30
31
|
async commandAction(logger, args) {
|
|
31
32
|
try {
|
|
32
|
-
const
|
|
33
|
+
const listAbsoluteUrl = await this.getListAbsoluteUrl(args.options, logger);
|
|
34
|
+
const labelName = await this.getLabelName(args.options, logger);
|
|
33
35
|
if (args.options.assetId) {
|
|
34
36
|
await this.applyAssetId(args.options, logger);
|
|
35
37
|
}
|
|
36
|
-
await
|
|
38
|
+
await spo.applyRetentionLabelToListItems(args.options.webUrl, labelName, listAbsoluteUrl, [parseInt(args.options.listItemId)], logger, args.options.verbose);
|
|
37
39
|
}
|
|
38
40
|
catch (err) {
|
|
39
41
|
this.handleRejectedODataJsonPromise(err);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
async
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
debug: options.debug,
|
|
47
|
-
verbose: options.verbose
|
|
48
|
-
};
|
|
49
|
-
const output = await Cli.executeCommandWithOutput(spoWebRetentionLabelListCommand, { options: { ...cmdOptions, _: [] } });
|
|
44
|
+
async getLabelName(options, logger) {
|
|
45
|
+
if (options.name) {
|
|
46
|
+
return options.name;
|
|
47
|
+
}
|
|
50
48
|
if (this.verbose) {
|
|
51
|
-
|
|
49
|
+
logger.logToStderr(`Retrieving the name of the retention label based on the Id '${options.id}'...`);
|
|
50
|
+
}
|
|
51
|
+
const requestUrl = `${options.webUrl}/_api/SP.CompliancePolicy.SPPolicyStoreProxy.GetAvailableTagsForSite(siteUrl=@a1)?@a1='${formatting.encodeQueryParameter(options.webUrl)}'`;
|
|
52
|
+
const labels = await odata.getAllItems(requestUrl);
|
|
53
|
+
const label = labels.find(l => l.TagId === options.id);
|
|
54
|
+
if (label === undefined) {
|
|
55
|
+
throw new Error(`The specified retention label does not exist or is not published to this SharePoint site. Use the name of the label if you want to apply an unpublished label.`);
|
|
52
56
|
}
|
|
53
|
-
const labels = JSON.parse(output.stdout);
|
|
54
|
-
const label = labels.find(l => l.TagName === options.name || l.TagId === options.id);
|
|
55
57
|
if (this.verbose && label !== undefined) {
|
|
56
58
|
await logger.logToStderr(`Retention label found in the list of available labels: '${label.TagName}' / '${label.TagId}'...`);
|
|
57
59
|
}
|
|
58
|
-
|
|
59
|
-
throw new Error(`The specified retention label does not exist`);
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
complianceTag: label.TagName,
|
|
63
|
-
isTagPolicyHold: label.BlockDelete,
|
|
64
|
-
isTagPolicyRecord: label.BlockEdit,
|
|
65
|
-
isEventBasedTag: label.IsEventTag,
|
|
66
|
-
isTagSuperLock: label.SuperLock,
|
|
67
|
-
isUnlockedAsDefault: label.UnlockedAsDefault
|
|
68
|
-
};
|
|
60
|
+
return label.TagName;
|
|
69
61
|
}
|
|
70
|
-
async
|
|
62
|
+
async getListAbsoluteUrl(options, logger) {
|
|
63
|
+
const parsedUrl = url.parse(options.webUrl);
|
|
64
|
+
const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
|
|
65
|
+
if (options.listUrl) {
|
|
66
|
+
const serverRelativePath = urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
|
|
67
|
+
return urlUtil.urlCombine(tenantUrl, serverRelativePath);
|
|
68
|
+
}
|
|
71
69
|
if (this.verbose) {
|
|
72
|
-
await logger.logToStderr(`
|
|
70
|
+
await logger.logToStderr(`Retrieving list absolute URL...`);
|
|
73
71
|
}
|
|
74
72
|
let requestUrl = `${options.webUrl}/_api/web`;
|
|
75
73
|
if (options.listId) {
|
|
76
|
-
requestUrl += `/lists(guid'${formatting.encodeQueryParameter(options.listId)}')
|
|
74
|
+
requestUrl += `/lists(guid'${formatting.encodeQueryParameter(options.listId)}')`;
|
|
77
75
|
}
|
|
78
76
|
else if (options.listTitle) {
|
|
79
|
-
requestUrl += `/lists/getByTitle('${formatting.encodeQueryParameter(options.listTitle)}')
|
|
80
|
-
}
|
|
81
|
-
else if (options.listUrl) {
|
|
82
|
-
const listServerRelativeUrl = urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
|
|
83
|
-
requestUrl += `/GetList(@listUrl)/items(${options.listItemId})/SetComplianceTag()?@listUrl='${formatting.encodeQueryParameter(listServerRelativeUrl)}'`;
|
|
77
|
+
requestUrl += `/lists/getByTitle('${formatting.encodeQueryParameter(options.listTitle)}')`;
|
|
84
78
|
}
|
|
85
79
|
const requestOptions = {
|
|
86
|
-
url: requestUrl
|
|
80
|
+
url: `${requestUrl}?$expand=RootFolder&$select=RootFolder/ServerRelativeUrl`,
|
|
87
81
|
headers: {
|
|
88
82
|
'accept': 'application/json;odata=nometadata'
|
|
89
83
|
},
|
|
90
|
-
data: labelInformation,
|
|
91
84
|
responseType: 'json'
|
|
92
85
|
};
|
|
93
|
-
await request.
|
|
86
|
+
const response = await request.get(requestOptions);
|
|
87
|
+
const serverRelativePath = urlUtil.getServerRelativePath(options.webUrl, response.RootFolder.ServerRelativeUrl);
|
|
88
|
+
const listAbsoluteUrl = urlUtil.urlCombine(tenantUrl, serverRelativePath);
|
|
89
|
+
if (this.verbose) {
|
|
90
|
+
logger.logToStderr(`List absolute URL found: '${listAbsoluteUrl}'`);
|
|
91
|
+
}
|
|
92
|
+
return listAbsoluteUrl;
|
|
94
93
|
}
|
|
95
94
|
async applyAssetId(options, logger) {
|
|
96
95
|
if (this.verbose) {
|
|
@@ -4,6 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _SpoListItemRetentionLabelRemoveCommand_instances, _SpoListItemRetentionLabelRemoveCommand_initTelemetry, _SpoListItemRetentionLabelRemoveCommand_initOptions, _SpoListItemRetentionLabelRemoveCommand_initValidators, _SpoListItemRetentionLabelRemoveCommand_initOptionSets;
|
|
7
|
+
import * as url from 'url';
|
|
7
8
|
import { Cli } from '../../../../cli/Cli.js';
|
|
8
9
|
import request from '../../../../request.js';
|
|
9
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -11,6 +12,7 @@ import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
|
11
12
|
import { validation } from '../../../../utils/validation.js';
|
|
12
13
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
14
|
import commands from '../../commands.js';
|
|
15
|
+
import { spo } from '../../../../utils/spo.js';
|
|
14
16
|
class SpoListItemRetentionLabelRemoveCommand extends SpoCommand {
|
|
15
17
|
get name() {
|
|
16
18
|
return commands.LISTITEM_RETENTIONLABEL_REMOVE;
|
|
@@ -31,56 +33,53 @@ class SpoListItemRetentionLabelRemoveCommand extends SpoCommand {
|
|
|
31
33
|
await this.removeListItemRetentionLabel(logger, args);
|
|
32
34
|
}
|
|
33
35
|
else {
|
|
34
|
-
const result = await Cli.
|
|
35
|
-
|
|
36
|
-
name: 'continue',
|
|
37
|
-
default: false,
|
|
38
|
-
message: `Are you sure you want to remove the retentionlabel from list item ${args.options.listItemId} from list '${args.options.listId || args.options.listTitle || args.options.listUrl}' located in site ${args.options.webUrl}?`
|
|
39
|
-
});
|
|
40
|
-
if (result.continue) {
|
|
36
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the retentionlabel from list item ${args.options.listItemId} from list '${args.options.listId || args.options.listTitle || args.options.listUrl}' located in site ${args.options.webUrl}?` });
|
|
37
|
+
if (result) {
|
|
41
38
|
await this.removeListItemRetentionLabel(logger, args);
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
41
|
}
|
|
45
42
|
async removeListItemRetentionLabel(logger, args) {
|
|
46
|
-
if (this.verbose) {
|
|
47
|
-
await logger.logToStderr(`Removing retention label from list item ${args.options.listItemId} from list '${args.options.listId || args.options.listTitle || args.options.listUrl}' in site at ${args.options.webUrl}...`);
|
|
48
|
-
}
|
|
49
43
|
try {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
url += `/lists(guid'${formatting.encodeQueryParameter(args.options.listId)}')/items(${args.options.listItemId})/SetComplianceTag()`;
|
|
53
|
-
}
|
|
54
|
-
else if (args.options.listTitle) {
|
|
55
|
-
url += `/lists/getByTitle('${formatting.encodeQueryParameter(args.options.listTitle)}')/items(${args.options.listItemId})/SetComplianceTag()`;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
const listServerRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
59
|
-
url += `/GetList(@a1)/items(@a2)/SetComplianceTag()?@a1='${formatting.encodeQueryParameter(listServerRelativeUrl)}'&@a2='${args.options.listItemId}'`;
|
|
60
|
-
}
|
|
61
|
-
const requestBody = {
|
|
62
|
-
"complianceTag": "",
|
|
63
|
-
"isTagPolicyHold": false,
|
|
64
|
-
"isTagPolicyRecord": false,
|
|
65
|
-
"isEventBasedTag": false,
|
|
66
|
-
"isTagSuperLock": false,
|
|
67
|
-
"isUnlockedAsDefault": false
|
|
68
|
-
};
|
|
69
|
-
const requestOptions = {
|
|
70
|
-
url: url,
|
|
71
|
-
method: 'POST',
|
|
72
|
-
headers: {
|
|
73
|
-
'accept': 'application/json;odata=nometadata'
|
|
74
|
-
},
|
|
75
|
-
data: requestBody,
|
|
76
|
-
responseType: 'json'
|
|
77
|
-
};
|
|
78
|
-
await request.post(requestOptions);
|
|
44
|
+
const listAbsoluteUrl = await this.getListAbsoluteUrl(args.options, logger);
|
|
45
|
+
await spo.removeRetentionLabelFromListItems(args.options.webUrl, listAbsoluteUrl, [parseInt(args.options.listItemId)], logger, args.options.verbose);
|
|
79
46
|
}
|
|
80
47
|
catch (err) {
|
|
81
48
|
this.handleRejectedODataJsonPromise(err);
|
|
82
49
|
}
|
|
83
50
|
}
|
|
51
|
+
async getListAbsoluteUrl(options, logger) {
|
|
52
|
+
const parsedUrl = url.parse(options.webUrl);
|
|
53
|
+
const tenantUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}`;
|
|
54
|
+
if (options.listUrl) {
|
|
55
|
+
const serverRelativePath = urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
|
|
56
|
+
return urlUtil.urlCombine(tenantUrl, serverRelativePath);
|
|
57
|
+
}
|
|
58
|
+
if (this.verbose) {
|
|
59
|
+
logger.logToStderr(`Retrieving list absolute URL...`);
|
|
60
|
+
}
|
|
61
|
+
let requestUrl = `${options.webUrl}/_api/web`;
|
|
62
|
+
if (options.listId) {
|
|
63
|
+
requestUrl += `/lists(guid'${formatting.encodeQueryParameter(options.listId)}')`;
|
|
64
|
+
}
|
|
65
|
+
else if (options.listTitle) {
|
|
66
|
+
requestUrl += `/lists/getByTitle('${formatting.encodeQueryParameter(options.listTitle)}')`;
|
|
67
|
+
}
|
|
68
|
+
const requestOptions = {
|
|
69
|
+
url: `${requestUrl}?$expand=RootFolder&$select=RootFolder/ServerRelativeUrl`,
|
|
70
|
+
headers: {
|
|
71
|
+
'accept': 'application/json;odata=nometadata'
|
|
72
|
+
},
|
|
73
|
+
responseType: 'json'
|
|
74
|
+
};
|
|
75
|
+
const response = await request.get(requestOptions);
|
|
76
|
+
const serverRelativePath = urlUtil.getServerRelativePath(options.webUrl, response.RootFolder.ServerRelativeUrl);
|
|
77
|
+
const listAbsoluteUrl = urlUtil.urlCombine(tenantUrl, serverRelativePath);
|
|
78
|
+
if (this.verbose) {
|
|
79
|
+
logger.logToStderr(`List absolute URL found: '${listAbsoluteUrl}'`);
|
|
80
|
+
}
|
|
81
|
+
return listAbsoluteUrl;
|
|
82
|
+
}
|
|
84
83
|
}
|
|
85
84
|
_SpoListItemRetentionLabelRemoveCommand_instances = new WeakSet(), _SpoListItemRetentionLabelRemoveCommand_initTelemetry = function _SpoListItemRetentionLabelRemoveCommand_initTelemetry() {
|
|
86
85
|
this.telemetry.push((args) => {
|
|
@@ -33,13 +33,8 @@ class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand {
|
|
|
33
33
|
await this.removeRoleAssignment(logger, args.options);
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
const result = await Cli.
|
|
37
|
-
|
|
38
|
-
name: 'continue',
|
|
39
|
-
default: false,
|
|
40
|
-
message: `Are you sure you want to remove role assignment from listitem ${args.options.listItemId} from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?`
|
|
41
|
-
});
|
|
42
|
-
if (result.continue) {
|
|
36
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove role assignment from listitem ${args.options.listItemId} from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?` });
|
|
37
|
+
if (result) {
|
|
43
38
|
await this.removeRoleAssignment(logger, args.options);
|
|
44
39
|
}
|
|
45
40
|
}
|
|
@@ -34,13 +34,8 @@ class SpoListItemRoleInheritanceBreakCommand extends SpoCommand {
|
|
|
34
34
|
await this.breakListItemRoleInheritance(args.options);
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
const result = await Cli.
|
|
38
|
-
|
|
39
|
-
name: 'continue',
|
|
40
|
-
default: false,
|
|
41
|
-
message: `Are you sure you want to break the role inheritance of ${args.options.listItemId} in list ${args.options.listId ?? args.options.listTitle}?`
|
|
42
|
-
});
|
|
43
|
-
if (result.continue) {
|
|
37
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to break the role inheritance of ${args.options.listItemId} in list ${args.options.listId ?? args.options.listTitle}?` });
|
|
38
|
+
if (result) {
|
|
44
39
|
await this.breakListItemRoleInheritance(args.options);
|
|
45
40
|
}
|
|
46
41
|
}
|
|
@@ -34,13 +34,8 @@ class SpoListItemRoleInheritanceResetCommand extends SpoCommand {
|
|
|
34
34
|
await this.resetListItemRoleInheritance(args.options);
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
const result = await Cli.
|
|
38
|
-
|
|
39
|
-
name: 'continue',
|
|
40
|
-
default: false,
|
|
41
|
-
message: `Are you sure you want to reset the role inheritance of ${args.options.listItemId} in list ${args.options.listId ?? args.options.listTitle}?`
|
|
42
|
-
});
|
|
43
|
-
if (result.continue) {
|
|
37
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to reset the role inheritance of ${args.options.listItemId} in list ${args.options.listId ?? args.options.listTitle}?` });
|
|
38
|
+
if (result) {
|
|
44
39
|
await this.resetListItemRoleInheritance(args.options);
|
|
45
40
|
}
|
|
46
41
|
}
|