@pnp/cli-microsoft365 5.0.0 → 5.1.0-beta.04832fc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/Cli.js +21 -6
- package/dist/cli/index.js +5 -1
- package/dist/m365/aad/commands/app/app-add.js +11 -11
- package/dist/m365/aad/commands/app/app-delete.js +3 -3
- package/dist/m365/aad/commands/app/app-get.js +3 -3
- package/dist/m365/aad/commands/app/app-role-delete.js +2 -2
- package/dist/m365/aad/commands/app/app-role-list.js +6 -5
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +4 -4
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +3 -3
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +4 -4
- package/dist/m365/aad/commands/group/group-list.js +8 -7
- package/dist/m365/aad/commands/groupsetting/groupsetting-add.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-get.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-list.js +7 -6
- package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +2 -2
- package/dist/m365/aad/commands/groupsetting/groupsetting-set.js +2 -2
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-get.js +8 -8
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-list.js +7 -6
- package/dist/m365/aad/commands/o365group/o365group-add.js +41 -3
- package/dist/m365/aad/commands/o365group/o365group-conversation-list.js +8 -8
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +87 -0
- package/dist/m365/aad/commands/o365group/o365group-get.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-list.js +15 -12
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-clear.js +8 -7
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +7 -6
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-remove.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-renew.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-set.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +2 -2
- package/dist/m365/aad/commands/o365group/o365group-user-add.js +3 -3
- package/dist/m365/aad/commands/o365group/o365group-user-list.js +21 -15
- package/dist/m365/aad/commands/o365group/o365group-user-remove.js +3 -3
- package/dist/m365/aad/commands/o365group/o365group-user-set.js +23 -17
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-add.js +3 -3
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-list.js +2 -2
- package/dist/m365/aad/commands/sp/sp-add.js +3 -3
- package/dist/m365/aad/commands/sp/sp-get.js +3 -3
- package/dist/m365/aad/commands/user/user-get.js +2 -2
- package/dist/m365/aad/commands/user/user-hibp.js +2 -2
- package/dist/m365/aad/commands/user/user-list.js +7 -6
- package/dist/m365/aad/commands/user/user-set.js +2 -2
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/base/AppCommand.js +2 -2
- package/dist/m365/base/SpoCommand.js +0 -260
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/commands/status.js +3 -3
- package/dist/m365/file/commands/file-add.js +3 -3
- package/dist/m365/file/commands/file-list.js +14 -12
- package/dist/m365/flow/commands/flow-export.js +2 -2
- package/dist/m365/flow/commands/flow-remove.js +2 -2
- package/dist/m365/flow/commands/run/run-cancel.js +2 -2
- package/dist/m365/flow/commands/run/run-resubmit.js +2 -2
- package/dist/m365/graph/commands/schemaextension/schemaextension-add.js +2 -2
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +2 -2
- package/dist/m365/graph/commands/schemaextension/schemaextension-set.js +2 -2
- package/dist/m365/graph/commands/subscription/subscription-add.js +2 -2
- package/dist/m365/onedrive/commands/onedrive-list.js +3 -2
- package/dist/m365/outlook/commands/message/message-list.js +6 -5
- package/dist/m365/outlook/commands/room/room-list.js +7 -6
- package/dist/m365/outlook/commands/roomlist/roomlist-list.js +7 -6
- package/dist/m365/pa/commands/app/app-get.js +2 -2
- package/dist/m365/pa/commands/app/app-remove.js +2 -2
- package/dist/m365/pa/commands/pcf/pcf-init.js +4 -4
- package/dist/m365/pa/commands/solution/solution-init.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-add.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-list.js +7 -7
- package/dist/m365/planner/commands/plan/plan-add.js +2 -2
- package/dist/m365/planner/commands/plan/plan-details-get.js +134 -0
- package/dist/m365/planner/commands/plan/plan-get.js +7 -7
- package/dist/m365/planner/commands/plan/plan-list.js +2 -2
- package/dist/m365/planner/commands/task/task-add.js +6 -6
- package/dist/m365/planner/commands/task/task-details-get.js +2 -2
- package/dist/m365/planner/commands/task/task-list.js +23 -23
- package/dist/m365/planner/commands/task/task-set.js +6 -6
- package/dist/m365/planner/commands.js +1 -0
- package/dist/m365/spfx/commands/package/package-generate.js +4 -4
- package/dist/m365/spfx/commands/project/base-project-command.js +18 -19
- package/dist/m365/spfx/commands/project/model/index.js +5 -1
- package/dist/m365/spfx/commands/project/project-externalize/index.js +5 -1
- package/dist/m365/spfx/commands/project/project-externalize/rules/index.js +5 -1
- package/dist/m365/spfx/commands/project/project-upgrade/index.js +5 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001005_DEP_types_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001006_DEP_types_react_dom.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001008_DEP_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001009_DEP_react_dom.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001015_DEP_types_react_addons_shallow_compare.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001016_DEP_types_react_addons_update.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001017_DEP_types_react_addons_update.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001019_DEP_knockout.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001020_DEP_types_knockout.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001022_DEP_office_ui_fabric_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001033_DEP_tslib.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002015_DEVDEP_types_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002016_DEVDEP_types_react_dom.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN020001_RES_types_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN022001_SCSS_remove_fabric_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN022002_SCSS_add_fabric_react.js +2 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023002_GITIGNORE_heft.js +40 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.0-beta.1.js +63 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +24 -19
- package/dist/m365/spo/commands/app/app-add.js +3 -2
- package/dist/m365/spo/commands/app/app-deploy.js +4 -4
- package/dist/m365/spo/commands/app/app-get.js +4 -4
- package/dist/m365/spo/commands/app/app-install.js +3 -3
- package/dist/m365/spo/commands/app/app-instance-list.js +2 -1
- package/dist/m365/spo/commands/app/app-list.js +3 -2
- package/dist/m365/spo/commands/app/app-remove.js +4 -5
- package/dist/m365/spo/commands/app/app-retract.js +4 -5
- package/dist/m365/spo/commands/app/app-uninstall.js +3 -3
- package/dist/m365/spo/commands/app/app-upgrade.js +3 -3
- package/dist/m365/spo/commands/apppage/apppage-add.js +2 -2
- package/dist/m365/spo/commands/apppage/apppage-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-get.js +4 -3
- package/dist/m365/spo/commands/cdn/cdn-origin-add.js +5 -5
- package/dist/m365/spo/commands/cdn/cdn-origin-list.js +4 -3
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +5 -5
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +4 -3
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +5 -5
- package/dist/m365/spo/commands/cdn/cdn-set.js +3 -2
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +6 -6
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +6 -6
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +6 -6
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +2 -1
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +2 -1
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +2 -1
- package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +3 -2
- package/dist/m365/spo/commands/customaction/customaction-add.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-clear.js +2 -1
- package/dist/m365/spo/commands/customaction/customaction-get.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-list.js +2 -1
- package/dist/m365/spo/commands/customaction/customaction-remove.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-set.js +4 -4
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +6 -6
- package/dist/m365/spo/commands/feature/feature-enable.js +2 -1
- package/dist/m365/spo/commands/feature/feature-list.js +2 -1
- package/dist/m365/spo/commands/field/field-add.js +3 -2
- package/dist/m365/spo/commands/field/field-get.js +5 -5
- package/dist/m365/spo/commands/field/field-remove.js +5 -5
- package/dist/m365/spo/commands/field/field-set.js +10 -10
- package/dist/m365/spo/commands/file/file-add.js +5 -7
- package/dist/m365/spo/commands/file/file-checkin.js +3 -3
- package/dist/m365/spo/commands/file/file-checkout.js +3 -3
- package/dist/m365/spo/commands/file/file-copy.js +18 -7
- package/dist/m365/spo/commands/file/file-get.js +3 -3
- package/dist/m365/spo/commands/file/file-list.js +3 -3
- package/dist/m365/spo/commands/file/file-move.js +18 -7
- package/dist/m365/spo/commands/file/file-remove.js +3 -3
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +3 -3
- package/dist/m365/spo/commands/folder/folder-add.js +3 -3
- package/dist/m365/spo/commands/folder/folder-copy.js +16 -5
- package/dist/m365/spo/commands/folder/folder-get.js +3 -3
- package/dist/m365/spo/commands/folder/folder-list.js +3 -3
- package/dist/m365/spo/commands/folder/folder-move.js +16 -5
- package/dist/m365/spo/commands/folder/folder-remove.js +3 -3
- package/dist/m365/spo/commands/folder/folder-rename.js +6 -8
- package/dist/m365/spo/commands/group/group-get.js +2 -1
- package/dist/m365/spo/commands/group/group-list.js +2 -1
- package/dist/m365/spo/commands/group/group-remove.js +2 -1
- package/dist/m365/spo/commands/group/group-user-add.js +2 -1
- package/dist/m365/spo/commands/group/group-user-list.js +2 -1
- package/dist/m365/spo/commands/group/group-user-remove.js +2 -1
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +2 -1
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +2 -1
- package/dist/m365/spo/commands/homesite/homesite-get.js +2 -1
- package/dist/m365/spo/commands/homesite/homesite-remove.js +3 -2
- package/dist/m365/spo/commands/homesite/homesite-set.js +5 -5
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-data-get.js +2 -1
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +3 -2
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +3 -3
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +2 -1
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +3 -2
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +6 -6
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +6 -6
- package/dist/m365/spo/commands/hubsite/hubsite-set.js +8 -8
- package/dist/m365/spo/commands/hubsite/hubsite-theme-sync.js +2 -1
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +3 -2
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +3 -2
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +3 -2
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +5 -5
- package/dist/m365/spo/commands/list/list-add.js +5 -5
- package/dist/m365/spo/commands/list/list-contenttype-add.js +3 -3
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +3 -3
- package/dist/m365/spo/commands/list/list-contenttype-list.js +3 -3
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +3 -3
- package/dist/m365/spo/commands/list/list-get.js +3 -3
- package/dist/m365/spo/commands/list/list-label-get.js +4 -4
- package/dist/m365/spo/commands/list/list-label-set.js +5 -5
- package/dist/m365/spo/commands/list/list-list.js +2 -1
- package/dist/m365/spo/commands/list/list-remove.js +3 -3
- package/dist/m365/spo/commands/list/list-set.js +6 -6
- package/dist/m365/spo/commands/list/list-sitescript-get.js +4 -4
- package/dist/m365/spo/commands/list/list-view-field-add.js +5 -5
- package/dist/m365/spo/commands/list/list-view-field-remove.js +5 -5
- package/dist/m365/spo/commands/list/list-view-field-set.js +5 -5
- package/dist/m365/spo/commands/list/list-view-get.js +5 -5
- package/dist/m365/spo/commands/list/list-view-list.js +3 -3
- package/dist/m365/spo/commands/list/list-view-remove.js +4 -4
- package/dist/m365/spo/commands/list/list-view-set.js +5 -5
- package/dist/m365/spo/commands/list/list-webhook-add.js +3 -3
- package/dist/m365/spo/commands/list/list-webhook-get.js +4 -4
- package/dist/m365/spo/commands/list/list-webhook-list.js +4 -4
- package/dist/m365/spo/commands/list/list-webhook-remove.js +4 -4
- package/dist/m365/spo/commands/list/list-webhook-set.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-add.js +5 -7
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +3 -3
- package/dist/m365/spo/commands/listitem/listitem-get.js +3 -3
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +5 -7
- package/dist/m365/spo/commands/listitem/listitem-list.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +6 -8
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +5 -7
- package/dist/m365/spo/commands/listitem/listitem-remove.js +3 -3
- package/dist/m365/spo/commands/listitem/listitem-set.js +4 -4
- package/dist/m365/spo/commands/mail/mail-send.js +2 -1
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +2 -1
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +2 -1
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +3 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +5 -4
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +3 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +3 -2
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +3 -2
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +5 -5
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +5 -5
- package/dist/m365/spo/commands/page/Page.js +2 -2
- package/dist/m365/spo/commands/page/page-add.js +4 -4
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +3 -3
- package/dist/m365/spo/commands/page/page-column-get.js +2 -1
- package/dist/m365/spo/commands/page/page-column-list.js +2 -1
- package/dist/m365/spo/commands/page/page-control-get.js +3 -3
- package/dist/m365/spo/commands/page/page-control-list.js +2 -1
- package/dist/m365/spo/commands/page/page-control-set.js +3 -3
- package/dist/m365/spo/commands/page/page-copy.js +2 -1
- package/dist/m365/spo/commands/page/page-get.js +3 -3
- package/dist/m365/spo/commands/page/page-header-set.js +2 -1
- package/dist/m365/spo/commands/page/page-list.js +2 -1
- package/dist/m365/spo/commands/page/page-remove.js +4 -4
- package/dist/m365/spo/commands/page/page-section-add.js +2 -1
- package/dist/m365/spo/commands/page/page-section-get.js +2 -1
- package/dist/m365/spo/commands/page/page-section-list.js +2 -1
- package/dist/m365/spo/commands/page/page-set.js +4 -4
- package/dist/m365/spo/commands/page/page-template-list.js +2 -1
- package/dist/m365/spo/commands/page/page-text-add.js +4 -4
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +4 -4
- package/dist/m365/spo/commands/propertybag/propertybag-get.js +4 -6
- package/dist/m365/spo/commands/propertybag/propertybag-list.js +4 -6
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +6 -9
- package/dist/m365/spo/commands/propertybag/propertybag-set.js +8 -10
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-add.js +4 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +3 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +4 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +5 -5
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +5 -5
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +3 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +3 -2
- package/dist/m365/spo/commands/site/site-add.js +36 -16
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +5 -5
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +5 -5
- package/dist/m365/spo/commands/site/site-apppermission-add.js +3 -4
- package/dist/m365/spo/commands/site/site-apppermission-get.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-list.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +3 -4
- package/dist/m365/spo/commands/site/site-apppermission-set.js +3 -4
- package/dist/m365/spo/commands/site/site-chrome-set.js +2 -1
- package/dist/m365/spo/commands/site/site-classic-add.js +33 -13
- package/dist/m365/spo/commands/site/site-classic-list.js +4 -4
- package/dist/m365/spo/commands/site/site-classic-set.js +33 -13
- package/dist/m365/spo/commands/site/site-commsite-enable.js +6 -6
- package/dist/m365/spo/commands/site/site-ensure.js +2 -1
- package/dist/m365/spo/commands/site/site-get.js +2 -1
- package/dist/m365/spo/commands/site/site-groupify.js +2 -1
- package/dist/m365/spo/commands/site/site-inplacerecordsmanagement-set.js +3 -3
- package/dist/m365/spo/commands/site/site-list.js +4 -4
- package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +2 -1
- package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +66 -0
- package/dist/m365/spo/commands/site/site-remove.js +34 -14
- package/dist/m365/spo/commands/site/site-rename.js +3 -2
- package/dist/m365/spo/commands/site/site-set.js +12 -12
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +3 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +2 -1
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +4 -4
- 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 +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +3 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +3 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +3 -3
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +2 -1
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +3 -3
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +3 -2
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +4 -4
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +3 -2
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +4 -4
- package/dist/m365/spo/commands/sitescript/sitescript-set.js +4 -4
- package/dist/m365/spo/commands/spo-search.js +4 -4
- package/dist/m365/spo/commands/spo-set.js +2 -1
- package/dist/m365/spo/commands/storageentity/storageentity-get.js +2 -1
- package/dist/m365/spo/commands/storageentity/storageentity-list.js +2 -1
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +5 -5
- package/dist/m365/spo/commands/storageentity/storageentity-set.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +2 -1
- package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +2 -1
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +16 -6
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +16 -6
- package/dist/m365/spo/commands/tenant/tenant-settings-list.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +5 -5
- package/dist/m365/spo/commands/term/term-add.js +13 -13
- package/dist/m365/spo/commands/term/term-get.js +9 -9
- package/dist/m365/spo/commands/term/term-group-add.js +6 -6
- package/dist/m365/spo/commands/term/term-group-get.js +5 -5
- package/dist/m365/spo/commands/term/term-group-list.js +3 -2
- package/dist/m365/spo/commands/term/term-list.js +7 -7
- package/dist/m365/spo/commands/term/term-set-add.js +9 -9
- package/dist/m365/spo/commands/term/term-set-get.js +7 -7
- package/dist/m365/spo/commands/term/term-set-list.js +5 -5
- package/dist/m365/spo/commands/theme/theme-apply.js +5 -5
- package/dist/m365/spo/commands/theme/theme-get.js +4 -4
- package/dist/m365/spo/commands/theme/theme-list.js +2 -1
- package/dist/m365/spo/commands/theme/theme-remove.js +2 -1
- package/dist/m365/spo/commands/theme/theme-set.js +5 -5
- package/dist/m365/spo/commands/user/user-get.js +2 -1
- package/dist/m365/spo/commands/user/user-list.js +2 -1
- package/dist/m365/spo/commands/user/user-remove.js +2 -1
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +3 -3
- package/dist/m365/spo/commands/userprofile/userprofile-set.js +3 -2
- package/dist/m365/spo/commands/web/web-add.js +4 -3
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +2 -1
- package/dist/m365/spo/commands/web/web-get.js +2 -1
- package/dist/m365/spo/commands/web/web-installedlanguage-list.js +2 -1
- package/dist/m365/spo/commands/web/web-list.js +2 -1
- package/dist/m365/spo/commands/web/web-reindex.js +10 -11
- package/dist/m365/spo/commands/web/web-remove.js +2 -1
- package/dist/m365/spo/commands/web/web-set.js +2 -1
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/app/app-install.js +4 -4
- package/dist/m365/teams/commands/app/app-list.js +8 -8
- package/dist/m365/teams/commands/app/app-remove.js +2 -2
- package/dist/m365/teams/commands/app/app-uninstall.js +2 -2
- package/dist/m365/teams/commands/app/app-update.js +2 -2
- package/dist/m365/teams/commands/channel/channel-add.js +2 -2
- package/dist/m365/teams/commands/channel/channel-get.js +3 -3
- package/dist/m365/teams/commands/channel/channel-list.js +7 -8
- package/dist/m365/teams/commands/channel/channel-remove.js +3 -3
- package/dist/m365/teams/commands/channel/channel-set.js +2 -2
- package/dist/m365/teams/commands/chat/chat-list.js +7 -6
- package/dist/m365/teams/commands/chat/chat-member-list.js +8 -8
- package/dist/m365/teams/commands/chat/chat-message-list.js +9 -9
- package/dist/m365/teams/commands/chat/chat-message-send.js +54 -62
- package/dist/m365/teams/commands/conversationmember/conversationmember-add.js +3 -3
- package/dist/m365/teams/commands/conversationmember/conversationmember-list.js +9 -9
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +2 -2
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +2 -2
- package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +2 -2
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +2 -2
- package/dist/m365/teams/commands/membersettings/membersettings-list.js +2 -2
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +2 -2
- package/dist/m365/teams/commands/message/message-get.js +3 -3
- package/dist/m365/teams/commands/message/message-list.js +12 -12
- package/dist/m365/teams/commands/message/message-reply-list.js +10 -10
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +2 -2
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +3 -3
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +3 -3
- package/dist/m365/teams/commands/report/report-pstncalls.js +3 -3
- package/dist/m365/teams/commands/tab/tab-add.js +5 -5
- package/dist/m365/teams/commands/tab/tab-get.js +4 -4
- package/dist/m365/teams/commands/tab/tab-list.js +10 -10
- package/dist/m365/teams/commands/tab/tab-remove.js +4 -4
- package/dist/m365/teams/commands/team/team-archive.js +2 -2
- package/dist/m365/teams/commands/team/team-clone.js +2 -2
- package/dist/m365/teams/commands/team/team-get.js +2 -2
- package/dist/m365/teams/commands/team/team-list.js +10 -12
- package/dist/m365/teams/commands/team/team-remove.js +2 -2
- package/dist/m365/teams/commands/team/team-set.js +2 -2
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -2
- package/dist/m365/teams/commands/user/user-app-add.js +3 -3
- package/dist/m365/teams/commands/user/user-app-list.js +10 -10
- package/dist/m365/teams/commands/user/user-app-remove.js +2 -2
- package/dist/m365/teams/commands/user/user-list.js +14 -8
- package/dist/m365/tenant/commands/auditlog/auditlog-report.js +2 -2
- package/dist/m365/tenant/commands/id/id-get.js +2 -2
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +2 -2
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +2 -2
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +2 -2
- package/dist/m365/tenant/commands/service/service-list.js +2 -2
- package/dist/m365/tenant/commands/service/service-message-list.js +2 -2
- package/dist/m365/tenant/commands/service/service-report-historicalservicestatus.js +2 -2
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +7 -6
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +7 -6
- package/dist/m365/tenant/commands/status/status-list.js +2 -2
- package/dist/m365/todo/commands/list/list-list.js +7 -6
- package/dist/m365/todo/commands/task/task-list.js +7 -6
- package/dist/request.js +4 -4
- package/dist/settingsNames.js +1 -0
- package/dist/utils/accessToken.js +44 -0
- package/dist/utils/formatting.js +69 -0
- package/dist/utils/fsUtil.js +36 -0
- package/dist/utils/index.js +26 -0
- package/dist/utils/odata.js +37 -0
- package/dist/utils/sinonUtil.js +19 -0
- package/dist/{m365/spfx/commands/project/project-upgrade/Utils.js → utils/spfx.js} +7 -19
- package/dist/utils/spo.js +432 -0
- package/dist/utils/urlUtil.js +174 -0
- package/dist/utils/validation.js +310 -0
- package/docs/docs/cmd/aad/o365group/o365group-add.md +42 -6
- package/docs/docs/cmd/aad/o365group/o365group-conversation-post-list.md +36 -0
- package/docs/docs/cmd/planner/plan/plan-details-get.md +45 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spo/site/site-recyclebinitem-restore.md +27 -0
- package/docs/docs/cmd/teams/chat/chat-message-send.md +4 -4
- package/npm-shrinkwrap.json +175 -190
- package/package.json +11 -11
- package/dist/Utils.js +0 -575
- package/dist/m365/base/AzmgmtResponse.js +0 -3
- package/dist/m365/base/GraphItemsListCommand.js +0 -46
- package/dist/m365/base/GraphResponse.js +0 -3
- package/dist/m365/base/GraphResponseError.js +0 -3
- package/dist/m365/spo/ClientSvc.js +0 -128
- package/dist/m365/spo/FolderExtensions.js +0 -101
- package/dist/m365/spo/commands/site/SpoOperation.js +0 -3
- package/dist/m365/spo/spo.js +0 -3
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const os = require("os");
|
|
13
13
|
const Auth_1 = require("../../../../Auth");
|
|
14
14
|
const request_1 = require("../../../../request");
|
|
15
|
-
const
|
|
15
|
+
const utils_1 = require("../../../../utils");
|
|
16
16
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
17
17
|
const commands_1 = require("../../commands");
|
|
18
18
|
class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
@@ -20,21 +20,22 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
20
20
|
return commands_1.default.CHAT_MESSAGE_SEND;
|
|
21
21
|
}
|
|
22
22
|
get description() {
|
|
23
|
-
return '
|
|
23
|
+
return 'Sends a chat message to a Microsoft Teams chat conversation.';
|
|
24
|
+
}
|
|
25
|
+
getTelemetryProperties(args) {
|
|
26
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
27
|
+
telemetryProps.chatId = typeof args.options.chatId !== 'undefined';
|
|
28
|
+
telemetryProps.userEmails = typeof args.options.userEmails !== 'undefined';
|
|
29
|
+
telemetryProps.chatName = typeof args.options.chatName !== 'undefined';
|
|
30
|
+
return telemetryProps;
|
|
24
31
|
}
|
|
25
32
|
commandAction(logger, args, cb) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
cb();
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
this.handleRejectedODataJsonPromise(error, logger, cb);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
33
|
+
this
|
|
34
|
+
.getChatId(logger, args)
|
|
35
|
+
.then(chatId => this.sendChatMessage(chatId, args))
|
|
36
|
+
.then(_ => {
|
|
37
|
+
cb();
|
|
38
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
38
39
|
}
|
|
39
40
|
options() {
|
|
40
41
|
const options = [
|
|
@@ -74,40 +75,48 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
74
75
|
if (!args.options.message) {
|
|
75
76
|
return 'Specify a message to send.';
|
|
76
77
|
}
|
|
77
|
-
if (args.options.chatId && !
|
|
78
|
+
if (args.options.chatId && !utils_1.validation.isValidTeamsChatId(args.options.chatId)) {
|
|
78
79
|
return `${args.options.chatId} is not a valid Teams ChatId.`;
|
|
79
80
|
}
|
|
80
81
|
if (args.options.userEmails) {
|
|
81
|
-
const userEmails = args.options.userEmails
|
|
82
|
-
if (!userEmails || userEmails.length === 0 || userEmails.some(e => !
|
|
82
|
+
const userEmails = this.convertCommaSeparatedListToArray(args.options.userEmails);
|
|
83
|
+
if (!userEmails || userEmails.length === 0 || userEmails.some(e => !utils_1.validation.isValidUserPrincipalName(e))) {
|
|
83
84
|
return `${args.options.userEmails} contains one or more invalid email addresses.`;
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
return true;
|
|
87
88
|
}
|
|
88
|
-
|
|
89
|
+
getChatId(logger, args) {
|
|
89
90
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
91
|
+
if (args.options.chatId) {
|
|
92
|
+
return args.options.chatId;
|
|
93
|
+
}
|
|
94
|
+
return args.options.userEmails
|
|
95
|
+
? this.ensureChatIdByUserEmails(args.options.userEmails, logger)
|
|
96
|
+
: this.getChatIdByName(args.options.chatName, logger);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
ensureChatIdByUserEmails(userEmailsOption, logger) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const userEmails = this.convertCommaSeparatedListToArray(userEmailsOption);
|
|
102
|
+
const currentUserEmail = utils_1.accessToken.getUserNameFromAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken).toLowerCase();
|
|
103
|
+
const existingChats = yield this.findExistingGroupChatsByMembers([currentUserEmail, ...userEmails], logger);
|
|
104
|
+
if (!existingChats || existingChats.length === 0) {
|
|
105
|
+
const chat = yield this.createConversation([currentUserEmail, ...userEmails]);
|
|
106
|
+
return chat.id;
|
|
103
107
|
}
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
if (existingChats.length === 1) {
|
|
109
|
+
return existingChats[0].id;
|
|
110
|
+
}
|
|
111
|
+
const disambiguationText = existingChats.map(c => {
|
|
112
|
+
return `- ${c.id}${c.topic && ' - '}${c.topic} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()}`;
|
|
113
|
+
}).join(os.EOL);
|
|
114
|
+
throw new Error(`Multiple chat conversations with this name found. Please disambiguate:${os.EOL}${disambiguationText}`);
|
|
106
115
|
});
|
|
107
116
|
}
|
|
108
|
-
getChatIdByName(chatName) {
|
|
117
|
+
getChatIdByName(chatName, logger) {
|
|
109
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
-
const existingChats = yield this.
|
|
119
|
+
const existingChats = yield this.findExistingGroupChatsByName(chatName, logger);
|
|
111
120
|
if (!existingChats || existingChats.length === 0) {
|
|
112
121
|
throw new Error('No chat conversation was found with this name.');
|
|
113
122
|
}
|
|
@@ -118,7 +127,7 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
118
127
|
const memberstring = c.members.map(m => m.email).join(', ');
|
|
119
128
|
return `- ${c.id} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()} - ${memberstring}`;
|
|
120
129
|
}).join(os.EOL);
|
|
121
|
-
throw new Error(`Multiple chat conversations with this
|
|
130
|
+
throw new Error(`Multiple chat conversations with this name found. Please disambiguate:${os.EOL}${disambiguationText}`);
|
|
122
131
|
});
|
|
123
132
|
}
|
|
124
133
|
// This Microsoft Graph API request throws an intermittent 404 exception, saying that it cannot find the principal.
|
|
@@ -159,7 +168,7 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
159
168
|
}
|
|
160
169
|
});
|
|
161
170
|
}
|
|
162
|
-
sendChatMessage(chatId,
|
|
171
|
+
sendChatMessage(chatId, args) {
|
|
163
172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
173
|
const requestOptions = {
|
|
165
174
|
url: `${this.resource}/v1.0/chats/${chatId}/messages`,
|
|
@@ -170,18 +179,18 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
170
179
|
responseType: 'json',
|
|
171
180
|
data: {
|
|
172
181
|
body: {
|
|
173
|
-
content: options.message
|
|
182
|
+
content: args.options.message
|
|
174
183
|
}
|
|
175
184
|
}
|
|
176
185
|
};
|
|
177
186
|
yield request_1.default.post(requestOptions);
|
|
178
187
|
});
|
|
179
188
|
}
|
|
180
|
-
findExistingGroupChatsByMembers(expectedMemberEmails) {
|
|
189
|
+
findExistingGroupChatsByMembers(expectedMemberEmails, logger) {
|
|
181
190
|
return __awaiter(this, void 0, void 0, function* () {
|
|
182
191
|
const endpoint = `${this.resource}/v1.0/chats?$filter=chatType eq 'group'&$expand=members&$select=id,topic,createdDateTime,members`;
|
|
183
192
|
const foundChats = [];
|
|
184
|
-
const chats = yield
|
|
193
|
+
const chats = yield utils_1.odata.getAllItems(endpoint, logger);
|
|
185
194
|
for (const chat of chats) {
|
|
186
195
|
const chatMembers = chat.members;
|
|
187
196
|
if (chatMembers.length === expectedMemberEmails.length) {
|
|
@@ -194,31 +203,14 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
194
203
|
return foundChats;
|
|
195
204
|
});
|
|
196
205
|
}
|
|
197
|
-
|
|
206
|
+
findExistingGroupChatsByName(name, logger) {
|
|
198
207
|
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
-
const endpoint = `${this.resource}/v1.0/chats?$filter=topic eq '${encodeURIComponent(
|
|
200
|
-
|
|
201
|
-
return chats;
|
|
208
|
+
const endpoint = `${this.resource}/v1.0/chats?$filter=topic eq '${encodeURIComponent(name)}'&$expand=members&$select=id,topic,createdDateTime,chatType`;
|
|
209
|
+
return utils_1.odata.getAllItems(endpoint, logger);
|
|
202
210
|
});
|
|
203
211
|
}
|
|
204
|
-
|
|
205
|
-
return
|
|
206
|
-
const requestOptions = {
|
|
207
|
-
url: url,
|
|
208
|
-
headers: {
|
|
209
|
-
accept: 'application/json;odata.metadata=none'
|
|
210
|
-
},
|
|
211
|
-
responseType: 'json'
|
|
212
|
-
};
|
|
213
|
-
const res = yield request_1.default.get(requestOptions);
|
|
214
|
-
items = items.concat(res.value);
|
|
215
|
-
if (res['@odata.nextLink']) {
|
|
216
|
-
return yield this.getAllChats(res['@odata.nextLink'], items);
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
return items;
|
|
220
|
-
}
|
|
221
|
-
});
|
|
212
|
+
convertCommaSeparatedListToArray(userEmailsString) {
|
|
213
|
+
return userEmailsString.toLowerCase().replace(/\s/g, '').split(',').filter(e => e && e !== '');
|
|
222
214
|
}
|
|
223
215
|
}
|
|
224
216
|
module.exports = new TeamsChatMessageSendCommand();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const os = require("os");
|
|
4
4
|
const request_1 = require("../../../../request");
|
|
5
|
-
const
|
|
5
|
+
const utils_1 = require("../../../../utils");
|
|
6
6
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
7
7
|
const commands_1 = require("../../commands");
|
|
8
8
|
class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
|
|
@@ -81,7 +81,7 @@ class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
|
|
|
81
81
|
if (!args.options.teamId && !args.options.teamName) {
|
|
82
82
|
return 'Specify teamId or teamName, one is required';
|
|
83
83
|
}
|
|
84
|
-
if (args.options.teamId && !
|
|
84
|
+
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
85
85
|
return `${args.options.teamId} is not a valid GUID`;
|
|
86
86
|
}
|
|
87
87
|
if (args.options.channelId && args.options.channelName) {
|
|
@@ -90,7 +90,7 @@ class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
|
|
|
90
90
|
if (!args.options.channelId && !args.options.channelName) {
|
|
91
91
|
return 'Specify channelId or channelName, one is required';
|
|
92
92
|
}
|
|
93
|
-
if (args.options.channelId && !
|
|
93
|
+
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
94
94
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
95
95
|
}
|
|
96
96
|
if (args.options.userId && args.options.userDisplayName) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
|
-
class TeamsConversationMemberListCommand extends
|
|
7
|
+
class TeamsConversationMemberListCommand extends GraphCommand_1.default {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.teamId = "";
|
|
@@ -31,13 +31,13 @@ class TeamsConversationMemberListCommand extends GraphItemsListCommand_1.GraphIt
|
|
|
31
31
|
return this.getChannelId(teamId, args);
|
|
32
32
|
}).then((channelId) => {
|
|
33
33
|
const endpoint = `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels/${encodeURIComponent(channelId)}/members`;
|
|
34
|
-
return
|
|
35
|
-
}).then(() => {
|
|
34
|
+
return utils_1.odata.getAllItems(endpoint, logger);
|
|
35
|
+
}).then((items) => {
|
|
36
36
|
if (args.options.output === 'json') {
|
|
37
|
-
logger.log(
|
|
37
|
+
logger.log(items);
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
-
logger.log(
|
|
40
|
+
logger.log(items.map((c) => {
|
|
41
41
|
return {
|
|
42
42
|
id: c.id,
|
|
43
43
|
displayName: c.displayName,
|
|
@@ -74,7 +74,7 @@ class TeamsConversationMemberListCommand extends GraphItemsListCommand_1.GraphIt
|
|
|
74
74
|
if (!args.options.teamId && !args.options.teamName) {
|
|
75
75
|
return 'Specify teamId or teamName, one is required';
|
|
76
76
|
}
|
|
77
|
-
if (args.options.teamId && !
|
|
77
|
+
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
78
78
|
return `${args.options.teamId} is not a valid GUID`;
|
|
79
79
|
}
|
|
80
80
|
if (args.options.channelId && args.options.channelName) {
|
|
@@ -83,7 +83,7 @@ class TeamsConversationMemberListCommand extends GraphItemsListCommand_1.GraphIt
|
|
|
83
83
|
if (!args.options.channelId && !args.options.channelName) {
|
|
84
84
|
return 'Specify channelId or channelName, one is required';
|
|
85
85
|
}
|
|
86
|
-
if (args.options.channelId && !
|
|
86
|
+
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
87
87
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
88
88
|
}
|
|
89
89
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsFunSettingsListCommand extends GraphCommand_1.default {
|
|
@@ -36,7 +36,7 @@ class TeamsFunSettingsListCommand extends GraphCommand_1.default {
|
|
|
36
36
|
return options.concat(parentOptions);
|
|
37
37
|
}
|
|
38
38
|
validate(args) {
|
|
39
|
-
if (!
|
|
39
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
40
40
|
return `${args.options.teamId} is not a valid GUID`;
|
|
41
41
|
}
|
|
42
42
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsFunSettingsSetCommand extends GraphCommand_1.default {
|
|
@@ -65,7 +65,7 @@ class TeamsFunSettingsSetCommand extends GraphCommand_1.default {
|
|
|
65
65
|
return options.concat(parentOptions);
|
|
66
66
|
}
|
|
67
67
|
validate(args) {
|
|
68
|
-
if (!
|
|
68
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
69
69
|
return `${args.options.teamId} is not a valid GUID`;
|
|
70
70
|
}
|
|
71
71
|
let isValid = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsGuestSettingsListCommand extends GraphCommand_1.default {
|
|
@@ -36,7 +36,7 @@ class TeamsGuestSettingsListCommand extends GraphCommand_1.default {
|
|
|
36
36
|
return options.concat(parentOptions);
|
|
37
37
|
}
|
|
38
38
|
validate(args) {
|
|
39
|
-
if (!
|
|
39
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
40
40
|
return `${args.options.teamId} is not a valid GUID`;
|
|
41
41
|
}
|
|
42
42
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsGuestSettingsSetCommand extends GraphCommand_1.default {
|
|
@@ -55,7 +55,7 @@ class TeamsGuestSettingsSetCommand extends GraphCommand_1.default {
|
|
|
55
55
|
return options.concat(parentOptions);
|
|
56
56
|
}
|
|
57
57
|
validate(args) {
|
|
58
|
-
if (!
|
|
58
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
59
59
|
return `${args.options.teamId} is not a valid GUID`;
|
|
60
60
|
}
|
|
61
61
|
let isValid = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsMemberSettingsListCommand extends GraphCommand_1.default {
|
|
@@ -36,7 +36,7 @@ class TeamsMemberSettingsListCommand extends GraphCommand_1.default {
|
|
|
36
36
|
return options.concat(parentOptions);
|
|
37
37
|
}
|
|
38
38
|
validate(args) {
|
|
39
|
-
if (!
|
|
39
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
40
40
|
return `${args.options.teamId} is not a valid GUID`;
|
|
41
41
|
}
|
|
42
42
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsMemberSettingsSetCommand extends GraphCommand_1.default {
|
|
@@ -64,7 +64,7 @@ class TeamsMemberSettingsSetCommand extends GraphCommand_1.default {
|
|
|
64
64
|
return options.concat(parentOptions);
|
|
65
65
|
}
|
|
66
66
|
validate(args) {
|
|
67
|
-
if (!
|
|
67
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
68
68
|
return `${args.options.teamId} is not a valid GUID`;
|
|
69
69
|
}
|
|
70
70
|
let isValid = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsMessageGetCommand extends GraphCommand_1.default {
|
|
@@ -42,10 +42,10 @@ class TeamsMessageGetCommand extends GraphCommand_1.default {
|
|
|
42
42
|
return options.concat(parentOptions);
|
|
43
43
|
}
|
|
44
44
|
validate(args) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
46
46
|
return `${args.options.teamId} is not a valid GUID`;
|
|
47
47
|
}
|
|
48
|
-
if (!
|
|
48
|
+
if (!utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
49
49
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
50
50
|
}
|
|
51
51
|
return true;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const utils_1 = require("../../../../utils");
|
|
4
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
5
5
|
const commands_1 = require("../../commands");
|
|
6
|
-
class TeamsMessageListCommand extends
|
|
6
|
+
class TeamsMessageListCommand extends GraphCommand_1.default {
|
|
7
7
|
get name() {
|
|
8
8
|
return commands_1.default.MESSAGE_LIST;
|
|
9
9
|
}
|
|
@@ -16,15 +16,15 @@ class TeamsMessageListCommand extends GraphItemsListCommand_1.GraphItemsListComm
|
|
|
16
16
|
commandAction(logger, args, cb) {
|
|
17
17
|
const deltaExtension = args.options.since !== undefined ? `/delta?$filter=lastModifiedDateTime gt ${args.options.since}` : '';
|
|
18
18
|
const endpoint = `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${args.options.channelId}/messages${deltaExtension}`;
|
|
19
|
-
|
|
20
|
-
.getAllItems(endpoint, logger
|
|
21
|
-
.then(() => {
|
|
19
|
+
utils_1.odata
|
|
20
|
+
.getAllItems(endpoint, logger)
|
|
21
|
+
.then((items) => {
|
|
22
22
|
if (args.options.output !== 'json') {
|
|
23
|
-
|
|
23
|
+
items.forEach(i => {
|
|
24
24
|
i.body = i.body.content;
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
logger.log(
|
|
27
|
+
logger.log(items);
|
|
28
28
|
cb();
|
|
29
29
|
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
30
30
|
}
|
|
@@ -44,16 +44,16 @@ class TeamsMessageListCommand extends GraphItemsListCommand_1.GraphItemsListComm
|
|
|
44
44
|
return options.concat(parentOptions);
|
|
45
45
|
}
|
|
46
46
|
validate(args) {
|
|
47
|
-
if (!
|
|
47
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
48
48
|
return `${args.options.teamId} is not a valid GUID`;
|
|
49
49
|
}
|
|
50
|
-
if (!
|
|
50
|
+
if (!utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
51
51
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
52
52
|
}
|
|
53
|
-
if (args.options.since && !
|
|
53
|
+
if (args.options.since && !utils_1.validation.isValidISODateDashOnly(args.options.since)) {
|
|
54
54
|
return `${args.options.since} is not a valid ISO Date (with dash separator)`;
|
|
55
55
|
}
|
|
56
|
-
if (args.options.since && !
|
|
56
|
+
if (args.options.since && !utils_1.validation.isDateInRange(args.options.since, 8)) {
|
|
57
57
|
return `${args.options.since} is not in the last 8 months (for delta messages)`;
|
|
58
58
|
}
|
|
59
59
|
return true;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const utils_1 = require("../../../../utils");
|
|
4
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
5
5
|
const commands_1 = require("../../commands");
|
|
6
|
-
class TeamsMessageReplyListCommand extends
|
|
6
|
+
class TeamsMessageReplyListCommand extends GraphCommand_1.default {
|
|
7
7
|
get name() {
|
|
8
8
|
return commands_1.default.MESSAGE_REPLY_LIST;
|
|
9
9
|
}
|
|
@@ -15,15 +15,15 @@ class TeamsMessageReplyListCommand extends GraphItemsListCommand_1.GraphItemsLis
|
|
|
15
15
|
}
|
|
16
16
|
commandAction(logger, args, cb) {
|
|
17
17
|
const endpoint = `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${args.options.channelId}/messages/${args.options.messageId}/replies`;
|
|
18
|
-
|
|
19
|
-
.getAllItems(endpoint, logger
|
|
20
|
-
.then(() => {
|
|
18
|
+
utils_1.odata
|
|
19
|
+
.getAllItems(endpoint, logger)
|
|
20
|
+
.then((items) => {
|
|
21
21
|
if (args.options.output !== 'json') {
|
|
22
|
-
|
|
22
|
+
items.forEach(i => {
|
|
23
23
|
i.body = i.body.content;
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
logger.log(
|
|
26
|
+
logger.log(items);
|
|
27
27
|
cb();
|
|
28
28
|
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
29
29
|
}
|
|
@@ -43,10 +43,10 @@ class TeamsMessageReplyListCommand extends GraphItemsListCommand_1.GraphItemsLis
|
|
|
43
43
|
return options.concat(parentOptions);
|
|
44
44
|
}
|
|
45
45
|
validate(args) {
|
|
46
|
-
if (!
|
|
46
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
47
47
|
return `${args.options.teamId} is not a valid GUID`;
|
|
48
48
|
}
|
|
49
|
-
if (!
|
|
49
|
+
if (!utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
50
50
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
51
51
|
}
|
|
52
52
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsMessagingSettingsListCommand extends GraphCommand_1.default {
|
|
@@ -36,7 +36,7 @@ class TeamsMessagingSettingsListCommand extends GraphCommand_1.default {
|
|
|
36
36
|
return options.concat(parentOptions);
|
|
37
37
|
}
|
|
38
38
|
validate(args) {
|
|
39
|
-
if (!
|
|
39
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
40
40
|
return `${args.options.teamId} is not a valid GUID`;
|
|
41
41
|
}
|
|
42
42
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsMessagingSettingsSetCommand extends GraphCommand_1.default {
|
|
@@ -64,7 +64,7 @@ class TeamsMessagingSettingsSetCommand extends GraphCommand_1.default {
|
|
|
64
64
|
return options.concat(parentOptions);
|
|
65
65
|
}
|
|
66
66
|
validate(args) {
|
|
67
|
-
if (!
|
|
67
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
68
68
|
return `${args.options.teamId} is not a valid GUID`;
|
|
69
69
|
}
|
|
70
70
|
let hasDuplicate = false;
|
|
@@ -83,7 +83,7 @@ class TeamsMessagingSettingsSetCommand extends GraphCommand_1.default {
|
|
|
83
83
|
TeamsMessagingSettingsSetCommand.props.every((p) => {
|
|
84
84
|
property = p;
|
|
85
85
|
value = args.options[p];
|
|
86
|
-
isValid = typeof value === 'undefined' ||
|
|
86
|
+
isValid = typeof value === 'undefined' || utils_1.validation.isValidBoolean(value);
|
|
87
87
|
return isValid;
|
|
88
88
|
});
|
|
89
89
|
if (!isValid) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsReportDirectroutingcallsCommand extends GraphCommand_1.default {
|
|
@@ -48,11 +48,11 @@ class TeamsReportDirectroutingcallsCommand extends GraphCommand_1.default {
|
|
|
48
48
|
return options.concat(parentOptions);
|
|
49
49
|
}
|
|
50
50
|
validate(args) {
|
|
51
|
-
if (!
|
|
51
|
+
if (!utils_1.validation.isValidISODateDashOnly(args.options.fromDateTime)) {
|
|
52
52
|
return 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)';
|
|
53
53
|
}
|
|
54
54
|
if (args.options.toDateTime &&
|
|
55
|
-
!
|
|
55
|
+
!utils_1.validation.isValidISODateDashOnly(args.options.toDateTime)) {
|
|
56
56
|
return 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)';
|
|
57
57
|
}
|
|
58
58
|
if (Math.ceil((new Date(args.options.toDateTime || new Date().toISOString()).getTime() - new Date(args.options.fromDateTime).getTime()) / (1000 * 3600 * 24)) > 90) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
5
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
7
|
class TeamsReportPstncallsCommand extends GraphCommand_1.default {
|
|
@@ -48,11 +48,11 @@ class TeamsReportPstncallsCommand extends GraphCommand_1.default {
|
|
|
48
48
|
return options.concat(parentOptions);
|
|
49
49
|
}
|
|
50
50
|
validate(args) {
|
|
51
|
-
if (!
|
|
51
|
+
if (!utils_1.validation.isValidISODateDashOnly(args.options.fromDateTime)) {
|
|
52
52
|
return 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)';
|
|
53
53
|
}
|
|
54
54
|
if (args.options.toDateTime &&
|
|
55
|
-
!
|
|
55
|
+
!utils_1.validation.isValidISODateDashOnly(args.options.toDateTime)) {
|
|
56
56
|
return 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)';
|
|
57
57
|
}
|
|
58
58
|
if (Math.ceil((new Date(args.options.toDateTime || new Date().toISOString()).getTime() - new Date(args.options.fromDateTime).getTime()) / (1000 * 3600 * 24)) > 90) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const request_1 = require("../../../../request");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
6
|
const commands_1 = require("../../commands");
|
|
7
|
-
class TeamsTabAddCommand extends
|
|
7
|
+
class TeamsTabAddCommand extends GraphCommand_1.default {
|
|
8
8
|
get name() {
|
|
9
9
|
return commands_1.default.TAB_ADD;
|
|
10
10
|
}
|
|
@@ -70,10 +70,10 @@ class TeamsTabAddCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
|
|
|
70
70
|
return options.concat(parentOptions);
|
|
71
71
|
}
|
|
72
72
|
validate(args) {
|
|
73
|
-
if (!
|
|
73
|
+
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
74
74
|
return `${args.options.teamId} is not a valid GUID`;
|
|
75
75
|
}
|
|
76
|
-
if (!
|
|
76
|
+
if (!utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
77
77
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
78
78
|
}
|
|
79
79
|
return true;
|