@pnp/cli-microsoft365 5.9.0-beta.fd6d022 → 6.0.0-beta.01ba480
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 +1 -2
- package/dist/Command.js +16 -2
- package/dist/appInsights.js +2 -0
- package/dist/m365/aad/commands/app/app-add.js +40 -17
- package/dist/m365/aad/commands/app/app-remove.js +0 -4
- package/dist/m365/aad/commands/app/app-role-remove.js +0 -4
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +11 -11
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +10 -10
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +10 -10
- package/dist/m365/aad/commands/o365group/o365group-add.js +2 -7
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +6 -6
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +0 -3
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +7 -7
- package/dist/m365/aad/commands/policy/policy-list.js +6 -6
- package/dist/m365/aad/commands/sp/sp-get.js +12 -12
- package/dist/m365/aad/commands/user/user-guest-add.js +103 -0
- package/dist/m365/aad/commands.js +1 -3
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- package/dist/m365/commands/status.js +6 -1
- package/dist/m365/flow/commands/flow-disable.js +2 -2
- package/dist/m365/flow/commands/flow-enable.js +2 -2
- package/dist/m365/flow/commands/flow-export.js +5 -5
- package/dist/m365/flow/commands/flow-get.js +2 -2
- package/dist/m365/flow/commands/flow-list.js +2 -2
- package/dist/m365/flow/commands/flow-remove.js +3 -3
- package/dist/m365/flow/commands/run/run-cancel.js +6 -6
- package/dist/m365/flow/commands/run/run-get.js +4 -4
- package/dist/m365/flow/commands/run/run-list.js +4 -4
- package/dist/m365/flow/commands/run/run-resubmit.js +7 -7
- package/dist/m365/outlook/commands/mail/mail-send.js +55 -34
- package/dist/m365/outlook/commands/message/message-get.js +97 -0
- package/dist/m365/outlook/commands/message/message-move.js +2 -2
- package/dist/m365/outlook/commands.js +2 -2
- package/dist/m365/pa/commands/connector/connector-export.js +3 -3
- package/dist/m365/pa/commands/connector/connector-list.js +2 -2
- package/dist/m365/pa/commands/solution/solution-reference-add.js +7 -7
- package/dist/m365/planner/commands/bucket/bucket-add.js +2 -9
- package/dist/m365/planner/commands/bucket/bucket-get.js +5 -12
- package/dist/m365/planner/commands/bucket/bucket-list.js +2 -9
- package/dist/m365/planner/commands/bucket/bucket-remove.js +4 -11
- package/dist/m365/planner/commands/bucket/bucket-set.js +4 -11
- package/dist/m365/planner/commands/plan/plan-get.js +5 -24
- package/dist/m365/planner/commands/task/task-add.js +3 -8
- package/dist/m365/planner/commands/task/task-get.js +5 -19
- package/dist/m365/planner/commands/task/task-list.js +4 -11
- package/dist/m365/planner/commands/task/task-set.js +5 -10
- package/dist/m365/planner/commands.js +0 -2
- package/dist/m365/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/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/spfx/commands/package/package-generate.js +2 -2
- package/dist/m365/spfx/commands/project/project-doctor.js +4 -1
- package/dist/m365/spfx/commands/project/project-externalize.js +4 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010001_YORC_version.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010002_YORC_isCreatingSolution.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010003_YORC_packageManager.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010004_YORC_componentType.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010005_YORC_environment.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010006_YORC_framework.js +3 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010007_YORC_isDomainIsolated.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010009_YORC_sdkVersions_microsoft_graph_client.js +56 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010010_YORC_sdkVersions_teams_js.js +56 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0.js +0 -2
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.16.0-beta.1.js → upgrade-1.16.0-beta.2.js} +44 -28
- package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +54 -9
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +1 -1
- package/dist/m365/spo/commands/app/app-add.js +7 -7
- package/dist/m365/spo/commands/app/app-deploy.js +7 -7
- package/dist/m365/spo/commands/app/app-get.js +7 -7
- package/dist/m365/spo/commands/app/app-install.js +6 -6
- package/dist/m365/spo/commands/app/app-list.js +7 -7
- package/dist/m365/spo/commands/app/app-remove.js +7 -7
- package/dist/m365/spo/commands/app/app-retract.js +7 -7
- package/dist/m365/spo/commands/app/app-uninstall.js +6 -6
- package/dist/m365/spo/commands/app/app-upgrade.js +6 -6
- package/dist/m365/spo/commands/apppage/apppage-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +7 -7
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +7 -7
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +82 -43
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +53 -21
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +13 -13
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +35 -14
- package/dist/m365/spo/commands/customaction/customaction-add.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-clear.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-get.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-list.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-remove.js +6 -5
- package/dist/m365/spo/commands/customaction/customaction-set.js +3 -3
- package/dist/m365/spo/commands/eventreceiver/EventReceiver.js +3 -0
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +182 -0
- package/dist/m365/spo/commands/feature/feature-disable.js +4 -4
- package/dist/m365/spo/commands/feature/feature-enable.js +5 -5
- package/dist/m365/spo/commands/feature/feature-list.js +3 -3
- package/dist/m365/spo/commands/field/field-add.js +26 -1
- package/dist/m365/spo/commands/field/field-get.js +1 -7
- package/dist/m365/spo/commands/field/field-remove.js +1 -7
- package/dist/m365/spo/commands/field/field-set.js +24 -21
- package/dist/m365/spo/commands/file/file-checkin.js +5 -5
- package/dist/m365/spo/commands/file/file-checkout.js +5 -5
- package/dist/m365/spo/commands/file/file-copy.js +25 -39
- package/dist/m365/spo/commands/file/file-move.js +24 -37
- package/dist/m365/spo/commands/file/file-rename.js +19 -16
- 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 +1 -1
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +13 -13
- package/dist/m365/spo/commands/folder/folder-get.js +6 -6
- package/dist/m365/spo/commands/folder/folder-remove.js +3 -3
- package/dist/m365/spo/commands/folder/folder-rename.js +4 -4
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +168 -0
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +104 -0
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +13 -2
- package/dist/m365/spo/commands/group/AssociatedGroupPropertiesCollection.js +3 -0
- package/dist/m365/spo/commands/group/group-list.js +49 -10
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-add.js +24 -21
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +59 -47
- package/dist/m365/spo/commands/list/list-contenttype-list.js +16 -8
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +19 -11
- package/dist/m365/spo/commands/list/list-list.js +3 -13
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +10 -10
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +8 -8
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +54 -25
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +50 -21
- package/dist/m365/spo/commands/list/list-view-field-add.js +20 -20
- package/dist/m365/spo/commands/list/list-view-field-remove.js +11 -11
- package/dist/m365/spo/commands/list/list-view-field-set.js +15 -15
- package/dist/m365/spo/commands/list/list-view-get.js +9 -9
- package/dist/m365/spo/commands/list/list-view-remove.js +11 -11
- package/dist/m365/spo/commands/list/list-view-set.js +11 -11
- package/dist/m365/spo/commands/list/list-webhook-add.js +19 -11
- package/dist/m365/spo/commands/list/list-webhook-get.js +17 -10
- package/dist/m365/spo/commands/list/list-webhook-list.js +17 -42
- package/dist/m365/spo/commands/list/list-webhook-remove.js +19 -11
- package/dist/m365/spo/commands/list/list-webhook-set.js +18 -10
- package/dist/m365/spo/commands/listitem/listitem-add.js +24 -14
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +18 -8
- package/dist/m365/spo/commands/listitem/listitem-get.js +18 -8
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +20 -10
- package/dist/m365/spo/commands/listitem/listitem-list.js +20 -29
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +23 -16
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +27 -24
- package/dist/m365/spo/commands/listitem/listitem-remove.js +19 -11
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +239 -0
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +8 -8
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +54 -25
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +53 -21
- package/dist/m365/spo/commands/listitem/listitem-set.js +52 -44
- package/dist/m365/spo/commands/page/page-column-get.js +2 -2
- package/dist/m365/spo/commands/page/page-column-list.js +2 -2
- package/dist/m365/spo/commands/page/page-control-get.js +4 -4
- package/dist/m365/spo/commands/page/page-control-list.js +3 -3
- package/dist/m365/spo/commands/page/page-control-set.js +3 -3
- package/dist/m365/spo/commands/page/page-section-add.js +2 -2
- package/dist/m365/spo/commands/page/page-section-get.js +2 -2
- package/dist/m365/spo/commands/page/page-section-list.js +2 -2
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +15 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +4 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +4 -4
- package/dist/m365/spo/commands/site/site-add.js +4 -11
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +3 -3
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +3 -3
- package/dist/m365/spo/commands/site/site-apppermission-get.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +5 -5
- package/dist/m365/spo/commands/site/site-apppermission-set.js +5 -5
- package/dist/m365/spo/commands/site/site-chrome-set.js +3 -3
- package/dist/m365/spo/commands/site/site-ensure.js +1 -1
- package/dist/m365/spo/commands/site/site-groupify.js +3 -3
- package/dist/m365/spo/commands/{hubsite/hubsite-connect.js → site/site-hubsite-connect.js} +17 -17
- package/dist/m365/spo/commands/{hubsite/hubsite-disconnect.js → site/site-hubsite-disconnect.js} +18 -18
- package/dist/m365/spo/commands/{hubsite/hubsite-theme-sync.js → site/site-hubsite-theme-sync.js} +11 -11
- package/dist/m365/spo/commands/site/site-list.js +6 -17
- package/dist/m365/spo/commands/site/site-rename.js +9 -9
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +3 -3
- package/dist/m365/spo/commands/web/web-add.js +4 -4
- package/dist/m365/spo/commands/web/web-get.js +3 -3
- package/dist/m365/spo/commands/web/web-list.js +4 -4
- package/dist/m365/spo/commands/web/web-reindex.js +8 -8
- package/dist/m365/spo/commands/web/web-remove.js +5 -5
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +10 -10
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +8 -8
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +100 -0
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +41 -15
- package/dist/m365/spo/commands/web/web-set.js +4 -4
- package/dist/m365/spo/commands.js +11 -6
- package/dist/m365/teams/commands/app/app-install.js +4 -4
- package/dist/m365/teams/commands/app/app-uninstall.js +3 -3
- package/dist/m365/teams/commands/channel/channel-add.js +9 -9
- package/dist/m365/teams/commands/channel/channel-get.js +10 -10
- package/dist/m365/teams/commands/channel/channel-member-add.js +0 -4
- package/dist/m365/teams/commands/channel/channel-member-list.js +0 -4
- package/dist/m365/teams/commands/channel/channel-member-remove.js +0 -4
- package/dist/m365/teams/commands/channel/channel-remove.js +16 -16
- package/dist/m365/teams/commands/channel/channel-set.js +7 -7
- package/dist/m365/teams/commands/message/message-get.js +3 -3
- package/dist/m365/teams/commands/tab/tab-get.js +10 -10
- package/dist/m365/teams/commands/tab/tab-remove.js +6 -6
- package/dist/m365/teams/commands/team/team-archive.js +3 -13
- package/dist/m365/teams/commands/team/team-clone.js +3 -20
- package/dist/m365/teams/commands/team/team-remove.js +5 -17
- package/dist/m365/teams/commands/team/team-set.js +1 -20
- package/dist/m365/teams/commands/team/team-unarchive.js +4 -16
- package/dist/m365/teams/commands/user/user-app-add.js +4 -4
- package/dist/m365/teams/commands/user/user-app-remove.js +3 -3
- package/dist/m365/teams/commands.js +0 -3
- package/dist/m365/todo/commands/list/list-get.js +89 -0
- package/dist/m365/todo/commands/task/task-add.js +55 -3
- package/dist/m365/todo/commands/task/task-get.js +108 -0
- package/dist/m365/todo/commands/task/task-set.js +53 -1
- package/dist/m365/todo/commands.js +2 -0
- package/dist/m365/viva/commands/connections/connections-app-create.js +9 -9
- package/dist/m365/yammer/commands/group/group-user-add.js +8 -8
- package/dist/m365/yammer/commands/group/group-user-remove.js +11 -11
- package/dist/m365/yammer/commands/message/message-like-set.js +5 -5
- package/dist/m365/yammer/commands/user/user-get.js +5 -5
- package/dist/settingsNames.js +0 -1
- package/dist/utils/cache.js +81 -0
- package/dist/utils/pid.js +57 -0
- package/dist/utils/powerPlatform.js +42 -0
- package/docs/docs/_clisettings.md +18 -0
- package/docs/docs/cmd/aad/app/app-remove.md +0 -6
- package/docs/docs/cmd/aad/app/app-role-remove.md +0 -6
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.md +5 -5
- package/docs/docs/cmd/aad/o365group/o365group-add.md +3 -3
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-list.md +7 -7
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-restore.md +0 -6
- package/docs/docs/cmd/aad/o365group/o365group-teamify.md +4 -4
- package/docs/docs/cmd/aad/policy/policy-list.md +2 -2
- package/docs/docs/cmd/aad/sp/sp-get.md +5 -5
- package/docs/docs/cmd/aad/user/user-guest-add.md +107 -0
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.md +3 -0
- package/docs/docs/cmd/flow/flow-disable.md +3 -3
- package/docs/docs/cmd/flow/flow-enable.md +1 -1
- package/docs/docs/cmd/flow/flow-export.md +5 -5
- package/docs/docs/cmd/flow/flow-get.md +3 -3
- package/docs/docs/cmd/flow/flow-list.md +3 -3
- package/docs/docs/cmd/flow/flow-remove.md +5 -5
- package/docs/docs/cmd/flow/run/run-cancel.md +3 -3
- package/docs/docs/cmd/flow/run/run-get.md +3 -3
- package/docs/docs/cmd/flow/run/run-list.md +3 -3
- package/docs/docs/cmd/flow/run/run-resubmit.md +4 -4
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.md +4 -11
- package/docs/docs/cmd/graph/schemaextension/schemaextension-set.md +4 -10
- package/docs/docs/cmd/outlook/mail/mail-send.md +13 -6
- package/docs/docs/cmd/outlook/message/message-get.md +48 -0
- package/docs/docs/cmd/outlook/message/message-move.md +4 -4
- package/docs/docs/cmd/pa/connector/connector-export.md +3 -3
- package/docs/docs/cmd/pa/connector/connector-list.md +2 -2
- package/docs/docs/cmd/pa/solution/solution-reference-add.md +2 -2
- package/docs/docs/cmd/planner/bucket/bucket-add.md +29 -3
- package/docs/docs/cmd/planner/bucket/bucket-get.md +29 -3
- package/docs/docs/cmd/planner/bucket/bucket-list.md +30 -3
- package/docs/docs/cmd/planner/bucket/bucket-remove.md +4 -3
- package/docs/docs/cmd/planner/bucket/bucket-set.md +4 -3
- package/docs/docs/cmd/planner/plan/plan-add.md +123 -0
- package/docs/docs/cmd/planner/plan/plan-get.md +75 -12
- package/docs/docs/cmd/planner/plan/plan-list.md +45 -0
- package/docs/docs/cmd/planner/plan/plan-remove.md +4 -0
- package/docs/docs/cmd/planner/task/task-add.md +0 -3
- package/docs/docs/cmd/planner/task/task-get.md +0 -6
- package/docs/docs/cmd/planner/task/task-list.md +0 -3
- package/docs/docs/cmd/planner/task/task-set.md +0 -3
- package/docs/docs/cmd/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/spfx/package/package-generate.md +2 -2
- package/docs/docs/cmd/spfx/project/project-rename.md +1 -14
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +10 -1
- package/docs/docs/cmd/spo/app/app-add.md +2 -2
- package/docs/docs/cmd/spo/app/app-deploy.md +2 -2
- package/docs/docs/cmd/spo/app/app-get.md +2 -2
- package/docs/docs/cmd/spo/app/app-install.md +2 -2
- package/docs/docs/cmd/spo/app/app-list.md +2 -2
- package/docs/docs/cmd/spo/app/app-remove.md +2 -2
- package/docs/docs/cmd/spo/app/app-retract.md +2 -2
- package/docs/docs/cmd/spo/app/app-uninstall.md +2 -2
- package/docs/docs/cmd/spo/app/app-upgrade.md +2 -2
- package/docs/docs/cmd/spo/apppage/apppage-set.md +2 -2
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.md +3 -3
- package/docs/docs/cmd/spo/contenttype/contenttype-add.md +20 -2
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.md +22 -4
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.md +4 -4
- package/docs/docs/cmd/spo/contenttype/contenttype-get.md +21 -3
- package/docs/docs/cmd/spo/customaction/customaction-add.md +13 -10
- package/docs/docs/cmd/spo/customaction/customaction-clear.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-get.md +5 -5
- package/docs/docs/cmd/spo/customaction/customaction-list.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-remove.md +9 -9
- package/docs/docs/cmd/spo/customaction/customaction-set.md +10 -9
- 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/feature/feature-disable.md +4 -4
- package/docs/docs/cmd/spo/feature/feature-enable.md +2 -2
- package/docs/docs/cmd/spo/feature/feature-list.md +3 -3
- package/docs/docs/cmd/spo/field/field-add.md +20 -2
- package/docs/docs/cmd/spo/field/field-get.md +0 -3
- package/docs/docs/cmd/spo/field/field-remove.md +0 -3
- package/docs/docs/cmd/spo/field/field-set.md +15 -6
- package/docs/docs/cmd/spo/file/file-checkin.md +6 -6
- package/docs/docs/cmd/spo/file/file-checkout.md +4 -4
- package/docs/docs/cmd/spo/file/file-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-sharinginfo-get.md +7 -7
- package/docs/docs/cmd/spo/folder/folder-get.md +3 -3
- package/docs/docs/cmd/spo/folder/folder-remove.md +3 -3
- package/docs/docs/cmd/spo/folder/folder-rename.md +2 -2
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.md +57 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +45 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +8 -2
- package/docs/docs/cmd/spo/group/group-list.md +10 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-get.md +3 -3
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.md +2 -2
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +18 -9
- 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 +19 -10
- package/docs/docs/cmd/spo/list/list-list.md +0 -3
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +20 -8
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +23 -5
- package/docs/docs/cmd/spo/list/list-view-field-add.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-field-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-view-field-set.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-get.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-remove.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-set.md +20 -9
- package/docs/docs/cmd/spo/list/list-webhook-add.md +15 -16
- package/docs/docs/cmd/spo/list/list-webhook-get.md +16 -7
- package/docs/docs/cmd/spo/list/list-webhook-list.md +13 -10
- package/docs/docs/cmd/spo/list/list-webhook-remove.md +12 -10
- package/docs/docs/cmd/spo/list/list-webhook-set.md +14 -12
- package/docs/docs/cmd/spo/listitem/listitem-add.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-get.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-isrecord.md +12 -2
- package/docs/docs/cmd/spo/listitem/listitem-list.md +9 -6
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +11 -8
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +14 -5
- package/docs/docs/cmd/spo/listitem/listitem-remove.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.md +81 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +16 -4
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.md +14 -2
- package/docs/docs/cmd/spo/listitem/listitem-set.md +7 -4
- package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.md +5 -10
- package/docs/docs/cmd/spo/page/page-column-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-column-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-set.md +6 -5
- package/docs/docs/cmd/spo/page/page-section-add.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-list.md +3 -3
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-deny.md +2 -2
- package/docs/docs/cmd/spo/site/site-add.md +2 -5
- package/docs/docs/cmd/spo/site/site-appcatalog-add.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-get.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-set.md +5 -5
- package/docs/docs/cmd/spo/site/site-chrome-set.md +4 -4
- package/docs/docs/cmd/spo/site/site-groupify.md +5 -11
- package/docs/docs/cmd/spo/{hubsite/hubsite-connect.md → site/site-hubsite-connect.md} +7 -7
- package/docs/docs/cmd/spo/site/site-hubsite-disconnect.md +42 -0
- package/docs/docs/cmd/spo/{hubsite/hubsite-theme-sync.md → site/site-hubsite-theme-sync.md} +5 -5
- package/docs/docs/cmd/spo/site/site-list.md +6 -6
- package/docs/docs/cmd/spo/site/site-rename.md +6 -6
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.md +2 -2
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.md +5 -5
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.md +6 -3
- package/docs/docs/cmd/spo/term/term-add.md +5 -0
- package/docs/docs/cmd/spo/term/term-set-add.md +6 -1
- package/docs/docs/cmd/spo/web/web-add.md +4 -4
- package/docs/docs/cmd/spo/web/web-get.md +3 -3
- package/docs/docs/cmd/spo/web/web-list.md +2 -2
- package/docs/docs/cmd/spo/web/web-reindex.md +2 -2
- package/docs/docs/cmd/spo/web/web-remove.md +2 -2
- package/docs/docs/cmd/spo/web/web-roleinheritance-break.md +44 -0
- package/docs/docs/cmd/spo/web/web-roleinheritance-reset.md +9 -0
- package/docs/docs/cmd/spo/web/web-set.md +9 -9
- package/docs/docs/cmd/teams/app/app-install.md +5 -5
- package/docs/docs/cmd/teams/app/app-uninstall.md +3 -3
- package/docs/docs/cmd/teams/channel/channel-add.md +4 -4
- package/docs/docs/cmd/teams/channel/channel-get.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-member-add.md +0 -6
- package/docs/docs/cmd/teams/channel/channel-member-list.md +0 -6
- package/docs/docs/cmd/teams/channel/channel-member-remove.md +0 -6
- package/docs/docs/cmd/teams/channel/channel-remove.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-set.md +4 -4
- package/docs/docs/cmd/teams/message/message-get.md +3 -3
- package/docs/docs/cmd/teams/tab/tab-get.md +6 -6
- package/docs/docs/cmd/teams/tab/tab-remove.md +4 -4
- package/docs/docs/cmd/teams/team/team-archive.md +0 -3
- package/docs/docs/cmd/teams/team/team-clone.md +0 -6
- package/docs/docs/cmd/teams/team/team-remove.md +0 -3
- package/docs/docs/cmd/teams/team/team-set.md +0 -6
- package/docs/docs/cmd/teams/team/team-unarchive.md +0 -3
- package/docs/docs/cmd/teams/user/user-app-add.md +3 -3
- package/docs/docs/cmd/teams/user/user-app-remove.md +3 -3
- package/docs/docs/cmd/tenant/id/id-get.md +20 -0
- package/docs/docs/cmd/tenant/report/report-activeusercounts.md +35 -0
- package/docs/docs/cmd/tenant/report/report-activeuserdetail.md +49 -0
- package/docs/docs/cmd/tenant/report/report-office365activationcounts.md +32 -0
- package/docs/docs/cmd/tenant/report/report-office365activationsusercounts.md +30 -0
- package/docs/docs/cmd/tenant/report/report-office365activationsuserdetail.md +36 -0
- package/docs/docs/cmd/tenant/report/report-servicesusercounts.md +41 -0
- package/docs/docs/cmd/tenant/security/security-alerts-list.md +105 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.md +87 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.md +91 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-get.md +62 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.md +51 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.md +64 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.md +52 -0
- package/docs/docs/cmd/todo/list/list-get.md +61 -0
- package/docs/docs/cmd/todo/task/task-add.md +32 -5
- package/docs/docs/cmd/todo/task/task-get.md +75 -0
- package/docs/docs/cmd/todo/task/task-set.md +29 -2
- package/docs/docs/cmd/viva/connections/connections-app-create.md +2 -2
- package/docs/docs/cmd/yammer/group/group-user-add.md +5 -5
- package/docs/docs/cmd/yammer/group/group-user-remove.md +5 -5
- package/docs/docs/cmd/yammer/message/message-like-set.md +4 -4
- package/docs/docs/cmd/yammer/user/user-get.md +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +13 -3
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +0 -60
- package/dist/m365/spo/commands/site/site-classic-add.js +0 -328
- package/dist/m365/spo/commands/site/site-classic-list.js +0 -115
- package/dist/m365/spo/commands/site/site-classic-set.js +0 -351
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +0 -42
- package/docs/docs/cmd/spo/site/site-classic-add.md +0 -93
- package/docs/docs/cmd/spo/site/site-classic-list.md +0 -68
- package/docs/docs/cmd/spo/site/site-classic-set.md +0 -102
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
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
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsTeamRemoveCommand_instances, _TeamsTeamRemoveCommand_initTelemetry, _TeamsTeamRemoveCommand_initOptions, _TeamsTeamRemoveCommand_initValidators;
|
|
16
|
+
var _TeamsTeamRemoveCommand_instances, _TeamsTeamRemoveCommand_initTelemetry, _TeamsTeamRemoveCommand_initOptions, _TeamsTeamRemoveCommand_initOptionSets, _TeamsTeamRemoveCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -28,6 +28,7 @@ class TeamsTeamRemoveCommand extends GraphCommand_1.default {
|
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsTeamRemoveCommand_instances, "m", _TeamsTeamRemoveCommand_initTelemetry).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _TeamsTeamRemoveCommand_instances, "m", _TeamsTeamRemoveCommand_initOptions).call(this);
|
|
30
30
|
__classPrivateFieldGet(this, _TeamsTeamRemoveCommand_instances, "m", _TeamsTeamRemoveCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _TeamsTeamRemoveCommand_instances, "m", _TeamsTeamRemoveCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
get name() {
|
|
33
34
|
return commands_1.default.TEAM_REMOVE;
|
|
@@ -50,10 +51,6 @@ class TeamsTeamRemoveCommand extends GraphCommand_1.default {
|
|
|
50
51
|
}
|
|
51
52
|
commandAction(logger, args) {
|
|
52
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
if (args.options.teamId) {
|
|
54
|
-
args.options.id = args.options.teamId;
|
|
55
|
-
this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
|
|
56
|
-
}
|
|
57
54
|
const removeTeam = () => __awaiter(this, void 0, void 0, function* () {
|
|
58
55
|
try {
|
|
59
56
|
const teamId = yield this.getTeamId(args);
|
|
@@ -78,7 +75,7 @@ class TeamsTeamRemoveCommand extends GraphCommand_1.default {
|
|
|
78
75
|
type: 'confirm',
|
|
79
76
|
name: 'continue',
|
|
80
77
|
default: false,
|
|
81
|
-
message: `Are you sure you want to remove the team ${args.options.
|
|
78
|
+
message: `Are you sure you want to remove the team ${args.options.id ? args.options.id : args.options.name}?`
|
|
82
79
|
});
|
|
83
80
|
if (result.continue) {
|
|
84
81
|
yield removeTeam();
|
|
@@ -98,22 +95,13 @@ _TeamsTeamRemoveCommand_instances = new WeakSet(), _TeamsTeamRemoveCommand_initT
|
|
|
98
95
|
option: '-i, --id [id]'
|
|
99
96
|
}, {
|
|
100
97
|
option: '-n, --name [name]'
|
|
101
|
-
}, {
|
|
102
|
-
option: '--teamId [teamId]'
|
|
103
98
|
}, {
|
|
104
99
|
option: '--confirm'
|
|
105
100
|
});
|
|
101
|
+
}, _TeamsTeamRemoveCommand_initOptionSets = function _TeamsTeamRemoveCommand_initOptionSets() {
|
|
102
|
+
this.optionSets.push(['id', 'name']);
|
|
106
103
|
}, _TeamsTeamRemoveCommand_initValidators = function _TeamsTeamRemoveCommand_initValidators() {
|
|
107
104
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
if (!args.options.id && !args.options.name && !args.options.teamId) {
|
|
109
|
-
return 'Specify either id or name';
|
|
110
|
-
}
|
|
111
|
-
if (args.options.name && (args.options.id || args.options.teamId)) {
|
|
112
|
-
return 'Specify either id or name but not both';
|
|
113
|
-
}
|
|
114
|
-
if (args.options.teamId && !validation_1.validation.isValidGuid(args.options.teamId)) {
|
|
115
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
116
|
-
}
|
|
117
105
|
if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
|
|
118
106
|
return `${args.options.id} is not a valid GUID`;
|
|
119
107
|
}
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
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
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsTeamSetCommand_instances, _TeamsTeamSetCommand_initTelemetry, _TeamsTeamSetCommand_initOptions, _TeamsTeamSetCommand_initValidators
|
|
16
|
+
var _TeamsTeamSetCommand_instances, _TeamsTeamSetCommand_initTelemetry, _TeamsTeamSetCommand_initOptions, _TeamsTeamSetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const validation_1 = require("../../../../utils/validation");
|
|
@@ -26,7 +26,6 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _TeamsTeamSetCommand_instances, "m", _TeamsTeamSetCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _TeamsTeamSetCommand_instances, "m", _TeamsTeamSetCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsTeamSetCommand_instances, "m", _TeamsTeamSetCommand_initValidators).call(this);
|
|
29
|
-
__classPrivateFieldGet(this, _TeamsTeamSetCommand_instances, "m", _TeamsTeamSetCommand_initOptionSets).call(this);
|
|
30
29
|
}
|
|
31
30
|
get name() {
|
|
32
31
|
return commands_1.default.TEAM_SET;
|
|
@@ -55,14 +54,6 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
|
|
|
55
54
|
}
|
|
56
55
|
commandAction(logger, args) {
|
|
57
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
if (args.options.teamId) {
|
|
59
|
-
args.options.id = args.options.teamId;
|
|
60
|
-
this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
|
|
61
|
-
}
|
|
62
|
-
if (args.options.displayName) {
|
|
63
|
-
args.options.name = args.options.displayName;
|
|
64
|
-
this.warn(logger, `Option 'displayName' is deprecated. Please use 'name' instead.`);
|
|
65
|
-
}
|
|
66
57
|
const data = this.mapRequestBody(args.options);
|
|
67
58
|
const requestOptions = {
|
|
68
59
|
url: `${this.resource}/v1.0/groups/${encodeURIComponent(args.options.id)}`,
|
|
@@ -90,12 +81,8 @@ _TeamsTeamSetCommand_instances = new WeakSet(), _TeamsTeamSetCommand_initTelemet
|
|
|
90
81
|
}, _TeamsTeamSetCommand_initOptions = function _TeamsTeamSetCommand_initOptions() {
|
|
91
82
|
this.options.unshift({
|
|
92
83
|
option: '-i, --id [id]'
|
|
93
|
-
}, {
|
|
94
|
-
option: '--teamId [teamId]'
|
|
95
84
|
}, {
|
|
96
85
|
option: '-n, --name [name]'
|
|
97
|
-
}, {
|
|
98
|
-
option: '--displayName [displayName]'
|
|
99
86
|
}, {
|
|
100
87
|
option: '--description [description]'
|
|
101
88
|
}, {
|
|
@@ -108,9 +95,6 @@ _TeamsTeamSetCommand_instances = new WeakSet(), _TeamsTeamSetCommand_initTelemet
|
|
|
108
95
|
});
|
|
109
96
|
}, _TeamsTeamSetCommand_initValidators = function _TeamsTeamSetCommand_initValidators() {
|
|
110
97
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
if (args.options.teamId && !validation_1.validation.isValidGuid(args.options.teamId)) {
|
|
112
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
113
|
-
}
|
|
114
98
|
if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
|
|
115
99
|
return `${args.options.id} is not a valid GUID`;
|
|
116
100
|
}
|
|
@@ -121,11 +105,8 @@ _TeamsTeamSetCommand_instances = new WeakSet(), _TeamsTeamSetCommand_initTelemet
|
|
|
121
105
|
}
|
|
122
106
|
return true;
|
|
123
107
|
}));
|
|
124
|
-
}, _TeamsTeamSetCommand_initOptionSets = function _TeamsTeamSetCommand_initOptionSets() {
|
|
125
|
-
this.optionSets.push(['id', 'teamId']);
|
|
126
108
|
};
|
|
127
109
|
TeamsTeamSetCommand.props = [
|
|
128
|
-
'displayName',
|
|
129
110
|
'description',
|
|
130
111
|
'mailNickName',
|
|
131
112
|
'classification',
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
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
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsTeamUnarchiveCommand_instances, _TeamsTeamUnarchiveCommand_initOptions, _TeamsTeamUnarchiveCommand_initValidators;
|
|
16
|
+
var _TeamsTeamUnarchiveCommand_instances, _TeamsTeamUnarchiveCommand_initOptions, _TeamsTeamUnarchiveCommand_initOptionSets, _TeamsTeamUnarchiveCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const validation_1 = require("../../../../utils/validation");
|
|
@@ -26,6 +26,7 @@ class TeamsTeamUnarchiveCommand extends GraphCommand_1.default {
|
|
|
26
26
|
_TeamsTeamUnarchiveCommand_instances.add(this);
|
|
27
27
|
__classPrivateFieldGet(this, _TeamsTeamUnarchiveCommand_instances, "m", _TeamsTeamUnarchiveCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsTeamUnarchiveCommand_instances, "m", _TeamsTeamUnarchiveCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _TeamsTeamUnarchiveCommand_instances, "m", _TeamsTeamUnarchiveCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.TEAM_UNARCHIVE;
|
|
@@ -48,10 +49,6 @@ class TeamsTeamUnarchiveCommand extends GraphCommand_1.default {
|
|
|
48
49
|
}
|
|
49
50
|
commandAction(logger, args) {
|
|
50
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
if (args.options.teamId) {
|
|
52
|
-
args.options.id = args.options.teamId;
|
|
53
|
-
this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
|
|
54
|
-
}
|
|
55
52
|
const endpoint = `${this.resource}/v1.0`;
|
|
56
53
|
try {
|
|
57
54
|
const teamId = yield this.getTeamId(args);
|
|
@@ -76,20 +73,11 @@ _TeamsTeamUnarchiveCommand_instances = new WeakSet(), _TeamsTeamUnarchiveCommand
|
|
|
76
73
|
option: '-i, --id [id]'
|
|
77
74
|
}, {
|
|
78
75
|
option: '-n, --name [name]'
|
|
79
|
-
}, {
|
|
80
|
-
option: '--teamId [teamId]'
|
|
81
76
|
});
|
|
77
|
+
}, _TeamsTeamUnarchiveCommand_initOptionSets = function _TeamsTeamUnarchiveCommand_initOptionSets() {
|
|
78
|
+
this.optionSets.push(['id', 'name']);
|
|
82
79
|
}, _TeamsTeamUnarchiveCommand_initValidators = function _TeamsTeamUnarchiveCommand_initValidators() {
|
|
83
80
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
if (!args.options.id && !args.options.name && !args.options.teamId) {
|
|
85
|
-
return 'Specify either id or name';
|
|
86
|
-
}
|
|
87
|
-
if (args.options.name && (args.options.id || args.options.teamId)) {
|
|
88
|
-
return 'Specify either id or name but not both';
|
|
89
|
-
}
|
|
90
|
-
if (args.options.teamId && !validation_1.validation.isValidGuid(args.options.teamId)) {
|
|
91
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
92
|
-
}
|
|
93
81
|
if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
|
|
94
82
|
return `${args.options.id} is not a valid GUID`;
|
|
95
83
|
}
|
|
@@ -43,7 +43,7 @@ class TeamsUserAppAddCommand extends GraphCommand_1.default {
|
|
|
43
43
|
},
|
|
44
44
|
responseType: 'json',
|
|
45
45
|
data: {
|
|
46
|
-
'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${args.options.
|
|
46
|
+
'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${args.options.id}`
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
try {
|
|
@@ -57,14 +57,14 @@ class TeamsUserAppAddCommand extends GraphCommand_1.default {
|
|
|
57
57
|
}
|
|
58
58
|
_TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initOptions = function _TeamsUserAppAddCommand_initOptions() {
|
|
59
59
|
this.options.unshift({
|
|
60
|
-
option: '--
|
|
60
|
+
option: '--id <id>'
|
|
61
61
|
}, {
|
|
62
62
|
option: '--userId <userId>'
|
|
63
63
|
});
|
|
64
64
|
}, _TeamsUserAppAddCommand_initValidators = function _TeamsUserAppAddCommand_initValidators() {
|
|
65
65
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
if (!validation_1.validation.isValidGuid(args.options.
|
|
67
|
-
return `${args.options.
|
|
66
|
+
if (!validation_1.validation.isValidGuid(args.options.id)) {
|
|
67
|
+
return `${args.options.id} is not a valid GUID`;
|
|
68
68
|
}
|
|
69
69
|
if (!validation_1.validation.isValidGuid(args.options.userId)) {
|
|
70
70
|
return `${args.options.userId} is not a valid GUID`;
|
|
@@ -39,7 +39,7 @@ class TeamsUserAppRemoveCommand extends GraphCommand_1.default {
|
|
|
39
39
|
const removeApp = () => __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
const endpoint = `${this.resource}/v1.0`;
|
|
41
41
|
const requestOptions = {
|
|
42
|
-
url: `${endpoint}/users/${args.options.userId}/teamwork/installedApps/${args.options.
|
|
42
|
+
url: `${endpoint}/users/${args.options.userId}/teamwork/installedApps/${args.options.id}`,
|
|
43
43
|
headers: {
|
|
44
44
|
'accept': 'application/json;odata.metadata=none'
|
|
45
45
|
},
|
|
@@ -60,7 +60,7 @@ class TeamsUserAppRemoveCommand extends GraphCommand_1.default {
|
|
|
60
60
|
type: 'confirm',
|
|
61
61
|
name: 'continue',
|
|
62
62
|
default: false,
|
|
63
|
-
message: `Are you sure you want to remove the app with id ${args.options.
|
|
63
|
+
message: `Are you sure you want to remove the app with id ${args.options.id} for user ${args.options.userId}?`
|
|
64
64
|
});
|
|
65
65
|
if (result.continue) {
|
|
66
66
|
yield removeApp();
|
|
@@ -77,7 +77,7 @@ _TeamsUserAppRemoveCommand_instances = new WeakSet(), _TeamsUserAppRemoveCommand
|
|
|
77
77
|
});
|
|
78
78
|
}, _TeamsUserAppRemoveCommand_initOptions = function _TeamsUserAppRemoveCommand_initOptions() {
|
|
79
79
|
this.options.unshift({
|
|
80
|
-
option: '--
|
|
80
|
+
option: '--id <id>'
|
|
81
81
|
}, {
|
|
82
82
|
option: '--userId <userId>'
|
|
83
83
|
}, {
|
|
@@ -23,9 +23,6 @@ exports.default = {
|
|
|
23
23
|
CHAT_MEMBER_LIST: `${prefix} chat member list`,
|
|
24
24
|
CHAT_MESSAGE_LIST: `${prefix} chat message list`,
|
|
25
25
|
CHAT_MESSAGE_SEND: `${prefix} chat message send`,
|
|
26
|
-
CONVERSATIONMEMBER_ADD: `${prefix} conversationmember add`,
|
|
27
|
-
CONVERSATIONMEMBER_LIST: `${prefix} conversationmember list`,
|
|
28
|
-
CONVERSATIONMEMBER_REMOVE: `${prefix} conversationmember remove`,
|
|
29
26
|
FUNSETTINGS_LIST: `${prefix} funsettings list`,
|
|
30
27
|
FUNSETTINGS_SET: `${prefix} funsettings set`,
|
|
31
28
|
GUESTSETTINGS_LIST: `${prefix} guestsettings list`,
|
|
@@ -0,0 +1,89 @@
|
|
|
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 _TodoListGetCommand_instances, _TodoListGetCommand_initTelemetry, _TodoListGetCommand_initOptions, _TodoListGetCommand_initOptionSets;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
|
+
const commands_1 = require("../../commands");
|
|
22
|
+
class TodoListGetCommand extends GraphCommand_1.default {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
_TodoListGetCommand_instances.add(this);
|
|
26
|
+
__classPrivateFieldGet(this, _TodoListGetCommand_instances, "m", _TodoListGetCommand_initTelemetry).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _TodoListGetCommand_instances, "m", _TodoListGetCommand_initOptions).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _TodoListGetCommand_instances, "m", _TodoListGetCommand_initOptionSets).call(this);
|
|
29
|
+
}
|
|
30
|
+
get name() {
|
|
31
|
+
return commands_1.default.LIST_GET;
|
|
32
|
+
}
|
|
33
|
+
get description() {
|
|
34
|
+
return 'Gets a specific list of Microsoft To Do task lists';
|
|
35
|
+
}
|
|
36
|
+
defaultProperties() {
|
|
37
|
+
return ['displayName', 'id'];
|
|
38
|
+
}
|
|
39
|
+
commandAction(logger, args) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
try {
|
|
42
|
+
const item = yield this.getList(args.options);
|
|
43
|
+
logger.log(item);
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
this.handleRejectedODataJsonPromise(err);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
getList(options) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const requestOptions = {
|
|
53
|
+
headers: {
|
|
54
|
+
accept: 'application/json;odata.metadata=none'
|
|
55
|
+
},
|
|
56
|
+
responseType: 'json'
|
|
57
|
+
};
|
|
58
|
+
if (options.id) {
|
|
59
|
+
requestOptions.url = `${this.resource}/v1.0/me/todo/lists/${options.id}`;
|
|
60
|
+
const result = yield request_1.default.get(requestOptions);
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
requestOptions.url = `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${formatting_1.formatting.encodeQueryParameter(options.name)}'`;
|
|
64
|
+
const result = yield request_1.default.get(requestOptions);
|
|
65
|
+
if (result.value.length === 0) {
|
|
66
|
+
throw `The specified list '${options.name}' does not exist.`;
|
|
67
|
+
}
|
|
68
|
+
return result.value[0];
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
_TodoListGetCommand_instances = new WeakSet(), _TodoListGetCommand_initTelemetry = function _TodoListGetCommand_initTelemetry() {
|
|
73
|
+
this.telemetry.push((args) => {
|
|
74
|
+
Object.assign(this.telemetryProperties, {
|
|
75
|
+
id: typeof args.options.id !== 'undefined',
|
|
76
|
+
name: typeof args.options.name !== 'undefined'
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}, _TodoListGetCommand_initOptions = function _TodoListGetCommand_initOptions() {
|
|
80
|
+
this.options.unshift({
|
|
81
|
+
option: '-i, --id [id]'
|
|
82
|
+
}, {
|
|
83
|
+
option: '-n, --name [name]'
|
|
84
|
+
});
|
|
85
|
+
}, _TodoListGetCommand_initOptionSets = function _TodoListGetCommand_initOptionSets() {
|
|
86
|
+
this.optionSets.push(['id', 'name']);
|
|
87
|
+
};
|
|
88
|
+
module.exports = new TodoListGetCommand();
|
|
89
|
+
//# sourceMappingURL=list-get.js.map
|
|
@@ -13,9 +13,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
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
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TodoTaskAddCommand_instances, _TodoTaskAddCommand_initTelemetry, _TodoTaskAddCommand_initOptions, _TodoTaskAddCommand_initOptionSets;
|
|
16
|
+
var _TodoTaskAddCommand_instances, _TodoTaskAddCommand_initTelemetry, _TodoTaskAddCommand_initOptions, _TodoTaskAddCommand_initValidators, _TodoTaskAddCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
21
22
|
class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
@@ -24,6 +25,7 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
24
25
|
_TodoTaskAddCommand_instances.add(this);
|
|
25
26
|
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initTelemetry).call(this);
|
|
26
27
|
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptions).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initValidators).call(this);
|
|
27
29
|
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptionSets).call(this);
|
|
28
30
|
}
|
|
29
31
|
get name() {
|
|
@@ -33,6 +35,7 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
33
35
|
return 'Add a task to a Microsoft To Do task list';
|
|
34
36
|
}
|
|
35
37
|
commandAction(logger, args) {
|
|
38
|
+
var _a, _b;
|
|
36
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
40
|
const endpoint = `${this.resource}/v1.0`;
|
|
38
41
|
try {
|
|
@@ -44,7 +47,14 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
44
47
|
'Content-Type': 'application/json'
|
|
45
48
|
},
|
|
46
49
|
data: {
|
|
47
|
-
title: args.options.title
|
|
50
|
+
title: args.options.title,
|
|
51
|
+
body: {
|
|
52
|
+
content: args.options.bodyContent,
|
|
53
|
+
contentType: ((_a = args.options.bodyContentType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || 'text'
|
|
54
|
+
},
|
|
55
|
+
importance: (_b = args.options.importance) === null || _b === void 0 ? void 0 : _b.toLowerCase(),
|
|
56
|
+
dueDateTime: this.getDateTimeTimeZone(args.options.dueDateTime),
|
|
57
|
+
reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime)
|
|
48
58
|
},
|
|
49
59
|
responseType: 'json'
|
|
50
60
|
};
|
|
@@ -56,6 +66,15 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
56
66
|
}
|
|
57
67
|
});
|
|
58
68
|
}
|
|
69
|
+
getDateTimeTimeZone(dateTime) {
|
|
70
|
+
if (!dateTime) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
dateTime: dateTime,
|
|
75
|
+
timeZone: 'Etc/GMT'
|
|
76
|
+
};
|
|
77
|
+
}
|
|
59
78
|
getTodoListId(args) {
|
|
60
79
|
if (args.options.listId) {
|
|
61
80
|
return Promise.resolve(args.options.listId);
|
|
@@ -81,7 +100,12 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
81
100
|
this.telemetry.push((args) => {
|
|
82
101
|
Object.assign(this.telemetryProperties, {
|
|
83
102
|
listId: typeof args.options.listId !== 'undefined',
|
|
84
|
-
listName: typeof args.options.listName !== 'undefined'
|
|
103
|
+
listName: typeof args.options.listName !== 'undefined',
|
|
104
|
+
bodyContent: typeof args.options.bodyContent !== 'undefined',
|
|
105
|
+
bodyContentType: args.options.bodyContentType,
|
|
106
|
+
dueDateTime: typeof args.options.dueDateTime !== 'undefined',
|
|
107
|
+
importance: args.options.importance,
|
|
108
|
+
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
|
|
85
109
|
});
|
|
86
110
|
});
|
|
87
111
|
}, _TodoTaskAddCommand_initOptions = function _TodoTaskAddCommand_initOptions() {
|
|
@@ -91,7 +115,35 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
91
115
|
option: '--listName [listName]'
|
|
92
116
|
}, {
|
|
93
117
|
option: '--listId [listId]'
|
|
118
|
+
}, {
|
|
119
|
+
option: '--bodyContent [bodyContent]'
|
|
120
|
+
}, {
|
|
121
|
+
option: '--bodyContentType [bodyContentType]',
|
|
122
|
+
autocomplete: ['text', 'html']
|
|
123
|
+
}, {
|
|
124
|
+
option: '--dueDateTime [dueDateTime]'
|
|
125
|
+
}, {
|
|
126
|
+
option: '--importance [importance]',
|
|
127
|
+
autocomplete: ['low', 'normal', 'high']
|
|
128
|
+
}, {
|
|
129
|
+
option: '--reminderDateTime [reminderDateTime]'
|
|
94
130
|
});
|
|
131
|
+
}, _TodoTaskAddCommand_initValidators = function _TodoTaskAddCommand_initValidators() {
|
|
132
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
if (args.options.bodyContentType && ['text', 'html'].indexOf(args.options.bodyContentType.toLowerCase()) === -1) {
|
|
134
|
+
return `'${args.options.bodyContentType}' is not a valid value for the bodyContentType option. Allowed values are text|html`;
|
|
135
|
+
}
|
|
136
|
+
if (args.options.importance && ['low', 'normal', 'high'].indexOf(args.options.importance.toLowerCase()) === -1) {
|
|
137
|
+
return `'${args.options.importance}' is not a valid value for the importance option. Allowed values are low|normal|high`;
|
|
138
|
+
}
|
|
139
|
+
if (args.options.dueDateTime && !validation_1.validation.isValidISODateTime(args.options.dueDateTime)) {
|
|
140
|
+
return `'${args.options.dueDateTime}' is not a valid ISO date string`;
|
|
141
|
+
}
|
|
142
|
+
if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
|
|
143
|
+
return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
|
|
144
|
+
}
|
|
145
|
+
return true;
|
|
146
|
+
}));
|
|
95
147
|
}, _TodoTaskAddCommand_initOptionSets = function _TodoTaskAddCommand_initOptionSets() {
|
|
96
148
|
this.optionSets.push(['listId', 'listName']);
|
|
97
149
|
};
|
|
@@ -0,0 +1,108 @@
|
|
|
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 _TodoTaskGetCommand_instances, _TodoTaskGetCommand_initTelemetry, _TodoTaskGetCommand_initOptions, _TodoTaskGetCommand_initOptionSets;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
|
+
const commands_1 = require("../../commands");
|
|
21
|
+
class TodoTaskGetCommand extends GraphCommand_1.default {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
_TodoTaskGetCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _TodoTaskGetCommand_instances, "m", _TodoTaskGetCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _TodoTaskGetCommand_instances, "m", _TodoTaskGetCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _TodoTaskGetCommand_instances, "m", _TodoTaskGetCommand_initOptionSets).call(this);
|
|
28
|
+
}
|
|
29
|
+
get name() {
|
|
30
|
+
return commands_1.default.TASK_GET;
|
|
31
|
+
}
|
|
32
|
+
get description() {
|
|
33
|
+
return 'Get a specific task from a Microsoft To Do task list';
|
|
34
|
+
}
|
|
35
|
+
defaultProperties() {
|
|
36
|
+
return ['id', 'title', 'status', 'createdDateTime', 'lastModifiedDateTime'];
|
|
37
|
+
}
|
|
38
|
+
getTodoListId(args) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (args.options.listId) {
|
|
41
|
+
return args.options.listId;
|
|
42
|
+
}
|
|
43
|
+
const requestOptions = {
|
|
44
|
+
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(args.options.listName)}'`,
|
|
45
|
+
headers: {
|
|
46
|
+
accept: 'application/json;odata.metadata=none'
|
|
47
|
+
},
|
|
48
|
+
responseType: 'json'
|
|
49
|
+
};
|
|
50
|
+
const response = yield request_1.default.get(requestOptions);
|
|
51
|
+
const taskList = response.value[0];
|
|
52
|
+
if (!taskList) {
|
|
53
|
+
throw `The specified task list does not exist`;
|
|
54
|
+
}
|
|
55
|
+
return taskList.id;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
commandAction(logger, args) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
try {
|
|
61
|
+
const listId = yield this.getTodoListId(args);
|
|
62
|
+
const requestOptions = {
|
|
63
|
+
url: `${this.resource}/v1.0/me/todo/lists/${listId}/tasks/${args.options.id}`,
|
|
64
|
+
headers: {
|
|
65
|
+
accept: 'application/json;odata.metadata=none'
|
|
66
|
+
},
|
|
67
|
+
responseType: 'json'
|
|
68
|
+
};
|
|
69
|
+
const item = yield request_1.default.get(requestOptions);
|
|
70
|
+
if (args.options.output === 'json') {
|
|
71
|
+
logger.log(item);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
logger.log({
|
|
75
|
+
id: item.id,
|
|
76
|
+
title: item.title,
|
|
77
|
+
status: item.status,
|
|
78
|
+
createdDateTime: item.createdDateTime,
|
|
79
|
+
lastModifiedDateTime: item.lastModifiedDateTime
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
this.handleRejectedODataJsonPromise(err);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
_TodoTaskGetCommand_instances = new WeakSet(), _TodoTaskGetCommand_initTelemetry = function _TodoTaskGetCommand_initTelemetry() {
|
|
90
|
+
this.telemetry.push((args) => {
|
|
91
|
+
Object.assign(this.telemetryProperties, {
|
|
92
|
+
listId: typeof args.options.listId !== 'undefined',
|
|
93
|
+
listName: typeof args.options.listName !== 'undefined'
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}, _TodoTaskGetCommand_initOptions = function _TodoTaskGetCommand_initOptions() {
|
|
97
|
+
this.options.unshift({
|
|
98
|
+
option: '-i, --id <id>'
|
|
99
|
+
}, {
|
|
100
|
+
option: '--listName [listName]'
|
|
101
|
+
}, {
|
|
102
|
+
option: '--listId [listId]'
|
|
103
|
+
});
|
|
104
|
+
}, _TodoTaskGetCommand_initOptionSets = function _TodoTaskGetCommand_initOptionSets() {
|
|
105
|
+
this.optionSets.push(['listId', 'listName']);
|
|
106
|
+
};
|
|
107
|
+
module.exports = new TodoTaskGetCommand();
|
|
108
|
+
//# sourceMappingURL=task-get.js.map
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TodoTaskSetCommand_instances, _TodoTaskSetCommand_initTelemetry, _TodoTaskSetCommand_initOptions, _TodoTaskSetCommand_initValidators, _TodoTaskSetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
21
22
|
class TodoTaskSetCommand extends GraphCommand_1.default {
|
|
@@ -76,7 +77,14 @@ class TodoTaskSetCommand extends GraphCommand_1.default {
|
|
|
76
77
|
return Promise.resolve(taskList.id);
|
|
77
78
|
});
|
|
78
79
|
}
|
|
80
|
+
getDateTimeTimeZone(dateTime) {
|
|
81
|
+
return {
|
|
82
|
+
dateTime: dateTime,
|
|
83
|
+
timeZone: 'Etc/GMT'
|
|
84
|
+
};
|
|
85
|
+
}
|
|
79
86
|
mapRequestBody(options) {
|
|
87
|
+
var _a;
|
|
80
88
|
const requestBody = {};
|
|
81
89
|
if (options.status) {
|
|
82
90
|
requestBody.status = options.status;
|
|
@@ -84,6 +92,21 @@ class TodoTaskSetCommand extends GraphCommand_1.default {
|
|
|
84
92
|
if (options.title) {
|
|
85
93
|
requestBody.title = options.title;
|
|
86
94
|
}
|
|
95
|
+
if (options.importance) {
|
|
96
|
+
requestBody.importance = options.importance.toLowerCase();
|
|
97
|
+
}
|
|
98
|
+
if (options.bodyContentType || options.bodyContent) {
|
|
99
|
+
requestBody.body = {
|
|
100
|
+
content: options.bodyContent,
|
|
101
|
+
contentType: ((_a = options.bodyContentType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || 'text'
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (options.dueDateTime) {
|
|
105
|
+
requestBody.dueDateTime = this.getDateTimeTimeZone(options.dueDateTime);
|
|
106
|
+
}
|
|
107
|
+
if (options.reminderDateTime) {
|
|
108
|
+
requestBody.reminderDateTime = this.getDateTimeTimeZone(options.reminderDateTime);
|
|
109
|
+
}
|
|
87
110
|
return requestBody;
|
|
88
111
|
}
|
|
89
112
|
}
|
|
@@ -93,7 +116,12 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
93
116
|
listId: typeof args.options.listId !== 'undefined',
|
|
94
117
|
listName: typeof args.options.listName !== 'undefined',
|
|
95
118
|
status: typeof args.options.status !== 'undefined',
|
|
96
|
-
title: typeof args.options.title !== 'undefined'
|
|
119
|
+
title: typeof args.options.title !== 'undefined',
|
|
120
|
+
bodyContent: typeof args.options.bodyContent !== 'undefined',
|
|
121
|
+
bodyContentType: args.options.bodyContentType,
|
|
122
|
+
dueDateTime: typeof args.options.dueDateTime !== 'undefined',
|
|
123
|
+
importance: args.options.importance,
|
|
124
|
+
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
|
|
97
125
|
});
|
|
98
126
|
});
|
|
99
127
|
}, _TodoTaskSetCommand_initOptions = function _TodoTaskSetCommand_initOptions() {
|
|
@@ -108,6 +136,18 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
108
136
|
option: '--listName [listName]'
|
|
109
137
|
}, {
|
|
110
138
|
option: '--listId [listId]'
|
|
139
|
+
}, {
|
|
140
|
+
option: '--bodyContent [bodyContent]'
|
|
141
|
+
}, {
|
|
142
|
+
option: '--bodyContentType [bodyContentType]',
|
|
143
|
+
autocomplete: ['text', 'html']
|
|
144
|
+
}, {
|
|
145
|
+
option: '--dueDateTime [dueDateTime]'
|
|
146
|
+
}, {
|
|
147
|
+
option: '--importance [importance]',
|
|
148
|
+
autocomplete: ['low', 'normal', 'high']
|
|
149
|
+
}, {
|
|
150
|
+
option: '--reminderDateTime [reminderDateTime]'
|
|
111
151
|
});
|
|
112
152
|
}, _TodoTaskSetCommand_initValidators = function _TodoTaskSetCommand_initValidators() {
|
|
113
153
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -119,6 +159,18 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
|
|
|
119
159
|
args.options.status !== 'deferred') {
|
|
120
160
|
return `${args.options.status} is not a valid value. Allowed values are notStarted|inProgress|completed|waitingOnOthers|deferred`;
|
|
121
161
|
}
|
|
162
|
+
if (args.options.bodyContentType && ['text', 'html'].indexOf(args.options.bodyContentType.toLowerCase()) === -1) {
|
|
163
|
+
return `'${args.options.bodyContentType}' is not a valid value for the bodyContentType option. Allowed values are text|html`;
|
|
164
|
+
}
|
|
165
|
+
if (args.options.importance && ['low', 'normal', 'high'].indexOf(args.options.importance.toLowerCase()) === -1) {
|
|
166
|
+
return `'${args.options.importance}' is not a valid value for the importance option. Allowed values are low|normal|high`;
|
|
167
|
+
}
|
|
168
|
+
if (args.options.dueDateTime && !validation_1.validation.isValidISODateTime(args.options.dueDateTime)) {
|
|
169
|
+
return `'${args.options.dueDateTime}' is not a valid ISO date string`;
|
|
170
|
+
}
|
|
171
|
+
if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
|
|
172
|
+
return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
|
|
173
|
+
}
|
|
122
174
|
return true;
|
|
123
175
|
}));
|
|
124
176
|
}, _TodoTaskSetCommand_initOptionSets = function _TodoTaskSetCommand_initOptionSets() {
|