@pnp/cli-microsoft365 5.1.0 → 5.2.0-beta.307d8f5
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/.mocharc.json +1 -0
- package/dist/Auth.js +2 -1
- package/dist/Command.js +10 -1
- package/dist/cli/Cli.js +2 -18
- package/dist/m365/aad/commands/user/user-signin-list.js +81 -0
- package/dist/m365/aad/commands.js +2 -1
- package/dist/m365/app/commands/app-get.js +3 -0
- package/dist/m365/cli/commands/cli-reconsent.js +20 -2
- package/dist/m365/cli/commands/config/config-set.js +1 -0
- package/dist/m365/pp/commands/environment/environment-list.js +57 -0
- package/dist/m365/pp/commands/managementapp/managementapp-list.js +24 -0
- package/dist/m365/pp/commands.js +3 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002019_DEVDEP_spfx_fast_serve_helpers.js +14 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.12.0.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.13.0.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.15.0-beta.1.js → upgrade-1.15.0-beta.6.js} +27 -27
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.4.1.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.9.1.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +5 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +1 -105
- package/dist/m365/spo/commands/file/file-checkout.js +2 -2
- package/dist/m365/spo/commands/site/site-remove.js +4 -3
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +10 -44
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +21 -0
- package/dist/m365/teams/commands/app/app-install.js +1 -1
- package/dist/m365/teams/commands/channel/channel-add.js +44 -14
- package/dist/m365/teams/commands/channel/channel-list.js +11 -1
- package/dist/m365/teams/commands/{conversationmember/conversationmember-add.js → channel/channel-member-add.js} +15 -22
- package/dist/m365/teams/commands/channel/channel-member-list.js +157 -0
- package/dist/m365/teams/commands/channel/channel-member-set.js +206 -0
- package/dist/m365/teams/commands/chat/chat-get.js +143 -0
- package/dist/m365/teams/commands/chat/chat-message-send.js +5 -30
- package/dist/m365/teams/commands/chat/chatUtil.js +62 -0
- package/dist/m365/teams/commands.js +4 -0
- package/dist/settingsNames.js +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/md.js +81 -0
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.md +1 -1
- package/docs/docs/cmd/aad/group/group-list.md +1 -1
- package/docs/docs/cmd/aad/groupsetting/groupsetting-add.md +1 -1
- package/docs/docs/cmd/aad/groupsetting/groupsetting-get.md +1 -1
- package/docs/docs/cmd/aad/groupsetting/groupsetting-list.md +1 -1
- package/docs/docs/cmd/aad/groupsetting/groupsetting-remove.md +1 -1
- package/docs/docs/cmd/aad/groupsetting/groupsetting-set.md +1 -1
- package/docs/docs/cmd/aad/groupsettingtemplate/groupsettingtemplate-get.md +1 -1
- package/docs/docs/cmd/aad/groupsettingtemplate/groupsettingtemplate-list.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-clear.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-remove.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-renew.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-report-activitycounts.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-report-activityfilecounts.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-report-activitygroupcounts.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-teamify.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-user-add.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-user-remove.md +1 -1
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-add.md +1 -1
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-list.md +1 -1
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-remove.md +1 -1
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-set.md +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-disable.md +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-enable.md +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-get.md +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-set.md +1 -1
- package/docs/docs/cmd/aad/sp/sp-get.md +1 -1
- package/docs/docs/cmd/aad/user/user-password-validate.md +1 -1
- package/docs/docs/cmd/aad/user/user-signin-list.md +81 -0
- package/docs/docs/cmd/cli/cli-doctor.md +1 -1
- package/docs/docs/cmd/flow/environment/environment-get.md +1 -1
- package/docs/docs/cmd/flow/environment/environment-list.md +1 -1
- package/docs/docs/cmd/flow/run/run-list.md +1 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.md +1 -1
- package/docs/docs/cmd/logout.md +1 -1
- package/docs/docs/cmd/onedrive/onedrive-list.md +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-list.md +1 -1
- package/docs/docs/cmd/planner/task/task-list.md +1 -1
- package/docs/docs/cmd/pp/environment/environment-list.md +37 -0
- package/docs/docs/cmd/pp/managementapp/managementapp-list.md +21 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +1 -1
- package/docs/docs/cmd/spo/app/app-add.md +1 -1
- package/docs/docs/cmd/spo/app/app-deploy.md +1 -1
- package/docs/docs/cmd/spo/app/app-get.md +1 -1
- package/docs/docs/cmd/spo/app/app-install.md +1 -1
- package/docs/docs/cmd/spo/app/app-instance-list.md +1 -1
- package/docs/docs/cmd/spo/app/app-list.md +1 -1
- package/docs/docs/cmd/spo/app/app-remove.md +1 -1
- package/docs/docs/cmd/spo/app/app-retract.md +1 -1
- package/docs/docs/cmd/spo/app/app-uninstall.md +1 -1
- package/docs/docs/cmd/spo/app/app-upgrade.md +1 -1
- package/docs/docs/cmd/spo/apppage/apppage-add.md +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-get.md +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-add.md +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-list.md +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.md +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-add.md +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.md +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.md +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-remove.md +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-add.md +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-clear.md +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-get.md +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-list.md +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-remove.md +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-set.md +1 -1
- package/docs/docs/cmd/spo/externaluser/externaluser-list.md +1 -1
- package/docs/docs/cmd/spo/feature/feature-list.md +1 -1
- package/docs/docs/cmd/spo/field/field-add.md +1 -1
- package/docs/docs/cmd/spo/field/field-get.md +1 -1
- package/docs/docs/cmd/spo/field/field-set.md +1 -1
- package/docs/docs/cmd/spo/file/file-add.md +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.md +1 -1
- package/docs/docs/cmd/spo/file/file-checkout.md +1 -1
- package/docs/docs/cmd/spo/file/file-copy.md +1 -1
- package/docs/docs/cmd/spo/file/file-get.md +1 -1
- package/docs/docs/cmd/spo/file/file-move.md +1 -1
- package/docs/docs/cmd/spo/file/file-remove.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-add.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-copy.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-get.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-list.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-move.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-remove.md +1 -1
- package/docs/docs/cmd/spo/folder/folder-rename.md +1 -1
- package/docs/docs/cmd/spo/group/group-user-add.md +1 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.md +1 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.md +1 -1
- package/docs/docs/cmd/spo/homesite/homesite-get.md +1 -1
- package/docs/docs/cmd/spo/homesite/homesite-set.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-data-get.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-get.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-list.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-set.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-theme-sync.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +1 -1
- package/docs/docs/cmd/spo/list/list-add.md +1 -1
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +1 -1
- package/docs/docs/cmd/spo/list/list-contenttype-list.md +1 -1
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +1 -1
- package/docs/docs/cmd/spo/list/list-get.md +1 -1
- package/docs/docs/cmd/spo/list/list-label-get.md +1 -1
- package/docs/docs/cmd/spo/list/list-label-set.md +1 -1
- package/docs/docs/cmd/spo/list/list-list.md +1 -1
- package/docs/docs/cmd/spo/list/list-remove.md +1 -1
- package/docs/docs/cmd/spo/list/list-set.md +1 -1
- package/docs/docs/cmd/spo/list/list-sitescript-get.md +1 -1
- package/docs/docs/cmd/spo/list/list-view-field-add.md +1 -1
- package/docs/docs/cmd/spo/list/list-view-field-remove.md +1 -1
- package/docs/docs/cmd/spo/list/list-view-get.md +1 -1
- package/docs/docs/cmd/spo/list/list-view-remove.md +1 -1
- package/docs/docs/cmd/spo/list/list-view-set.md +1 -1
- package/docs/docs/cmd/spo/list/list-webhook-add.md +1 -1
- package/docs/docs/cmd/spo/list/list-webhook-get.md +1 -1
- package/docs/docs/cmd/spo/list/list-webhook-list.md +1 -1
- package/docs/docs/cmd/spo/list/list-webhook-remove.md +1 -1
- package/docs/docs/cmd/spo/list/list-webhook-set.md +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-add.md +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-list.md +2 -2
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-set.md +1 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-add.md +1 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-list.md +1 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-remove.md +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.md +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-remove.md +1 -1
- package/docs/docs/cmd/spo/page/page-add.md +1 -1
- package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.md +1 -1
- package/docs/docs/cmd/spo/page/page-column-get.md +1 -1
- package/docs/docs/cmd/spo/page/page-column-list.md +1 -1
- package/docs/docs/cmd/spo/page/page-control-get.md +1 -1
- package/docs/docs/cmd/spo/page/page-control-list.md +1 -1
- package/docs/docs/cmd/spo/page/page-list.md +1 -1
- package/docs/docs/cmd/spo/page/page-remove.md +1 -1
- package/docs/docs/cmd/spo/page/page-section-add.md +1 -1
- package/docs/docs/cmd/spo/page/page-section-get.md +1 -1
- package/docs/docs/cmd/spo/page/page-section-list.md +1 -1
- package/docs/docs/cmd/spo/page/page-set.md +1 -1
- package/docs/docs/cmd/spo/page/page-template-list.md +1 -1
- package/docs/docs/cmd/spo/page/page-text-add.md +1 -1
- package/docs/docs/cmd/spo/propertybag/propertybag-get.md +1 -1
- package/docs/docs/cmd/spo/propertybag/propertybag-list.md +1 -1
- package/docs/docs/cmd/spo/propertybag/propertybag-remove.md +1 -1
- package/docs/docs/cmd/spo/propertybag/propertybag-set.md +1 -1
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-add.md +1 -1
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.md +1 -1
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.md +1 -1
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +1 -1
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-deny.md +1 -1
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-list.md +1 -1
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-set.md +1 -1
- package/docs/docs/cmd/spo/site/site-add.md +1 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-add.md +1 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.md +1 -1
- package/docs/docs/cmd/spo/site/site-classic-add.md +1 -1
- package/docs/docs/cmd/spo/site/site-commsite-enable.md +1 -1
- package/docs/docs/cmd/spo/site/site-inplacerecordsmanagement-set.md +1 -1
- package/docs/docs/cmd/spo/site/site-set.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-apply.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-get.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-list.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-remove.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-list.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-status-get.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-list.md +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.md +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-add.md +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-get.md +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-list.md +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-remove.md +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-set.md +1 -1
- package/docs/docs/cmd/spo/spo-get.md +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-list.md +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.md +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalogurl-get.md +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-settings-list.md +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-settings-set.md +52 -33
- package/docs/docs/cmd/spo/term/term-add.md +1 -1
- package/docs/docs/cmd/spo/term/term-get.md +1 -1
- package/docs/docs/cmd/spo/term/term-group-add.md +1 -1
- package/docs/docs/cmd/spo/term/term-group-get.md +1 -1
- package/docs/docs/cmd/spo/term/term-group-list.md +1 -1
- package/docs/docs/cmd/spo/term/term-list.md +1 -1
- package/docs/docs/cmd/spo/term/term-set-add.md +1 -1
- package/docs/docs/cmd/spo/term/term-set-get.md +1 -1
- package/docs/docs/cmd/spo/term/term-set-list.md +1 -1
- package/docs/docs/cmd/spo/theme/theme-apply.md +1 -1
- package/docs/docs/cmd/spo/theme/theme-get.md +1 -1
- package/docs/docs/cmd/spo/theme/theme-list.md +1 -1
- package/docs/docs/cmd/spo/theme/theme-remove.md +1 -1
- package/docs/docs/cmd/spo/user/user-remove.md +1 -1
- package/docs/docs/cmd/spo/web/web-add.md +1 -1
- package/docs/docs/cmd/spo/web/web-clientsidewebpart-list.md +1 -1
- package/docs/docs/cmd/spo/web/web-get.md +1 -1
- package/docs/docs/cmd/spo/web/web-list.md +1 -1
- package/docs/docs/cmd/spo/web/web-reindex.md +1 -1
- package/docs/docs/cmd/spo/web/web-remove.md +1 -1
- package/docs/docs/cmd/teams/app/app-publish.md +1 -1
- package/docs/docs/cmd/teams/app/app-remove.md +1 -1
- package/docs/docs/cmd/teams/app/app-uninstall.md +1 -1
- package/docs/docs/cmd/teams/channel/channel-add.md +18 -0
- package/docs/docs/cmd/teams/channel/channel-list.md +12 -3
- package/docs/docs/cmd/teams/{conversationmember/conversationmember-add.md → channel/channel-member-add.md} +10 -4
- package/docs/docs/cmd/teams/channel/channel-member-list.md +54 -0
- package/docs/docs/cmd/teams/channel/channel-member-set.md +51 -0
- package/docs/docs/cmd/teams/channel/channel-set.md +1 -1
- package/docs/docs/cmd/teams/chat/chat-get.md +53 -0
- package/docs/docs/cmd/teams/guestsettings/guestsettings-list.md +1 -1
- package/docs/docs/cmd/teams/guestsettings/guestsettings-set.md +1 -1
- package/docs/docs/cmd/teams/membersettings/membersettings-list.md +1 -1
- package/docs/docs/cmd/teams/membersettings/membersettings-set.md +1 -1
- package/docs/docs/cmd/teams/message/message-get.md +1 -1
- package/docs/docs/cmd/teams/message/message-reply-list.md +1 -1
- package/docs/docs/cmd/teams/messagingsettings/messagingsettings-list.md +1 -1
- package/docs/docs/cmd/teams/messagingsettings/messagingsettings-set.md +1 -1
- package/docs/docs/cmd/teams/report/report-pstncalls.md +1 -1
- package/docs/docs/cmd/teams/tab/tab-list.md +1 -1
- package/docs/docs/cmd/teams/team/team-archive.md +1 -1
- package/docs/docs/cmd/teams/team/team-clone.md +1 -1
- package/docs/docs/cmd/teams/team/team-get.md +1 -1
- package/docs/docs/cmd/teams/team/team-list.md +1 -1
- package/docs/docs/cmd/teams/team/team-remove.md +1 -1
- package/docs/docs/cmd/teams/team/team-set.md +1 -1
- package/docs/docs/cmd/teams/team/team-unarchive.md +1 -1
- package/docs/docs/cmd/todo/task/task-list.md +1 -1
- package/docs/docs/cmd/todo/task/task-set.md +1 -1
- package/npm-shrinkwrap.json +24 -738
- package/package.json +5 -4
- package/dist/m365/teams/commands/conversationmember/conversationmember-list.js +0 -164
- package/docs/docs/cmd/teams/conversationmember/conversationmember-list.md +0 -39
|
@@ -63,10 +63,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
63
63
|
range: '^6',
|
|
64
64
|
fix: 'Install Node.js v6'
|
|
65
65
|
},
|
|
66
|
-
react: {
|
|
67
|
-
range: '^15',
|
|
68
|
-
fix: 'npm i react@15'
|
|
69
|
-
},
|
|
70
66
|
sp: SharePointVersion.All,
|
|
71
67
|
yo: {
|
|
72
68
|
range: '^3',
|
|
@@ -82,10 +78,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
82
78
|
range: '^6',
|
|
83
79
|
fix: 'Install Node.js v6'
|
|
84
80
|
},
|
|
85
|
-
react: {
|
|
86
|
-
range: '^15',
|
|
87
|
-
fix: 'npm i react@15'
|
|
88
|
-
},
|
|
89
81
|
sp: SharePointVersion.All,
|
|
90
82
|
yo: {
|
|
91
83
|
range: '^3',
|
|
@@ -101,10 +93,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
101
93
|
range: '^6',
|
|
102
94
|
fix: 'Install Node.js v6'
|
|
103
95
|
},
|
|
104
|
-
react: {
|
|
105
|
-
range: '^15',
|
|
106
|
-
fix: 'npm i react@15'
|
|
107
|
-
},
|
|
108
96
|
sp: SharePointVersion.SP2019 | SharePointVersion.SPO,
|
|
109
97
|
yo: {
|
|
110
98
|
range: '^3',
|
|
@@ -120,10 +108,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
120
108
|
range: '^6',
|
|
121
109
|
fix: 'Install Node.js v6'
|
|
122
110
|
},
|
|
123
|
-
react: {
|
|
124
|
-
range: '^15',
|
|
125
|
-
fix: 'npm i react@15'
|
|
126
|
-
},
|
|
127
111
|
sp: SharePointVersion.SP2019 | SharePointVersion.SPO,
|
|
128
112
|
yo: {
|
|
129
113
|
range: '^3',
|
|
@@ -139,10 +123,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
139
123
|
range: '^6 || ^8',
|
|
140
124
|
fix: 'Install Node.js v8'
|
|
141
125
|
},
|
|
142
|
-
react: {
|
|
143
|
-
range: '^15',
|
|
144
|
-
fix: 'npm i react@15'
|
|
145
|
-
},
|
|
146
126
|
sp: SharePointVersion.SP2019 | SharePointVersion.SPO,
|
|
147
127
|
yo: {
|
|
148
128
|
range: '^3',
|
|
@@ -158,10 +138,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
158
138
|
range: '^6 || ^8',
|
|
159
139
|
fix: 'Install Node.js v8'
|
|
160
140
|
},
|
|
161
|
-
react: {
|
|
162
|
-
range: '^15',
|
|
163
|
-
fix: 'npm i react@15'
|
|
164
|
-
},
|
|
165
141
|
sp: SharePointVersion.SPO,
|
|
166
142
|
yo: {
|
|
167
143
|
range: '^3',
|
|
@@ -177,10 +153,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
177
153
|
range: '^6 || ^8',
|
|
178
154
|
fix: 'Install Node.js v8'
|
|
179
155
|
},
|
|
180
|
-
react: {
|
|
181
|
-
range: '^15',
|
|
182
|
-
fix: 'npm i react@15'
|
|
183
|
-
},
|
|
184
156
|
sp: SharePointVersion.SPO,
|
|
185
157
|
yo: {
|
|
186
158
|
range: '^3',
|
|
@@ -196,10 +168,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
196
168
|
range: '^6 || ^8',
|
|
197
169
|
fix: 'Install Node.js v8'
|
|
198
170
|
},
|
|
199
|
-
react: {
|
|
200
|
-
range: '^15',
|
|
201
|
-
fix: 'npm i react@15'
|
|
202
|
-
},
|
|
203
171
|
sp: SharePointVersion.SPO,
|
|
204
172
|
yo: {
|
|
205
173
|
range: '^3',
|
|
@@ -215,10 +183,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
215
183
|
range: '^8',
|
|
216
184
|
fix: 'Install Node.js v8'
|
|
217
185
|
},
|
|
218
|
-
react: {
|
|
219
|
-
range: '16.3.2',
|
|
220
|
-
fix: 'npm i react@16.3.2'
|
|
221
|
-
},
|
|
222
186
|
sp: SharePointVersion.SPO,
|
|
223
187
|
yo: {
|
|
224
188
|
range: '^3',
|
|
@@ -234,10 +198,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
234
198
|
range: '^8',
|
|
235
199
|
fix: 'Install Node.js v8'
|
|
236
200
|
},
|
|
237
|
-
react: {
|
|
238
|
-
range: '16.3.2',
|
|
239
|
-
fix: 'npm i react@16.3.2'
|
|
240
|
-
},
|
|
241
201
|
sp: SharePointVersion.SPO,
|
|
242
202
|
yo: {
|
|
243
203
|
range: '^3',
|
|
@@ -253,10 +213,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
253
213
|
range: '^8',
|
|
254
214
|
fix: 'Install Node.js v8'
|
|
255
215
|
},
|
|
256
|
-
react: {
|
|
257
|
-
range: '16.7.0',
|
|
258
|
-
fix: 'npm i react@16.7.0'
|
|
259
|
-
},
|
|
260
216
|
sp: SharePointVersion.SPO,
|
|
261
217
|
yo: {
|
|
262
218
|
range: '^3',
|
|
@@ -272,10 +228,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
272
228
|
range: '^8',
|
|
273
229
|
fix: 'Install Node.js v8'
|
|
274
230
|
},
|
|
275
|
-
react: {
|
|
276
|
-
range: '16.7.0',
|
|
277
|
-
fix: 'npm i react@16.7.0'
|
|
278
|
-
},
|
|
279
231
|
sp: SharePointVersion.SPO,
|
|
280
232
|
yo: {
|
|
281
233
|
range: '^3',
|
|
@@ -291,10 +243,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
291
243
|
range: '^8 || ^10',
|
|
292
244
|
fix: 'Install Node.js v10'
|
|
293
245
|
},
|
|
294
|
-
react: {
|
|
295
|
-
range: '16.7.0',
|
|
296
|
-
fix: 'npm i react@16.7.0'
|
|
297
|
-
},
|
|
298
246
|
sp: SharePointVersion.SPO,
|
|
299
247
|
yo: {
|
|
300
248
|
range: '^3',
|
|
@@ -310,10 +258,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
310
258
|
range: '^8 || ^10',
|
|
311
259
|
fix: 'Install Node.js v10'
|
|
312
260
|
},
|
|
313
|
-
react: {
|
|
314
|
-
range: '16.8.5',
|
|
315
|
-
fix: 'npm i react@16.8.5'
|
|
316
|
-
},
|
|
317
261
|
sp: SharePointVersion.SPO,
|
|
318
262
|
yo: {
|
|
319
263
|
range: '^3',
|
|
@@ -329,10 +273,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
329
273
|
range: '^10',
|
|
330
274
|
fix: 'Install Node.js v10'
|
|
331
275
|
},
|
|
332
|
-
react: {
|
|
333
|
-
range: '16.8.5',
|
|
334
|
-
fix: 'npm i react@16.8.5'
|
|
335
|
-
},
|
|
336
276
|
sp: SharePointVersion.SPO,
|
|
337
277
|
yo: {
|
|
338
278
|
range: '^3',
|
|
@@ -348,10 +288,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
348
288
|
range: '^10',
|
|
349
289
|
fix: 'Install Node.js v10'
|
|
350
290
|
},
|
|
351
|
-
react: {
|
|
352
|
-
range: '16.8.5',
|
|
353
|
-
fix: 'npm i react@16.8.5'
|
|
354
|
-
},
|
|
355
291
|
sp: SharePointVersion.SPO,
|
|
356
292
|
yo: {
|
|
357
293
|
range: '^3',
|
|
@@ -367,10 +303,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
367
303
|
range: '^10',
|
|
368
304
|
fix: 'Install Node.js v10'
|
|
369
305
|
},
|
|
370
|
-
react: {
|
|
371
|
-
range: '16.8.5',
|
|
372
|
-
fix: 'npm i react@16.8.5'
|
|
373
|
-
},
|
|
374
306
|
sp: SharePointVersion.SPO,
|
|
375
307
|
yo: {
|
|
376
308
|
range: '^3',
|
|
@@ -386,10 +318,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
386
318
|
range: '^12',
|
|
387
319
|
fix: 'Install Node.js v12'
|
|
388
320
|
},
|
|
389
|
-
react: {
|
|
390
|
-
range: '16.9.0',
|
|
391
|
-
fix: 'npm i react@16.9.0'
|
|
392
|
-
},
|
|
393
321
|
sp: SharePointVersion.SPO,
|
|
394
322
|
yo: {
|
|
395
323
|
range: '^3',
|
|
@@ -405,10 +333,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
405
333
|
range: '^12 || ^14',
|
|
406
334
|
fix: 'Install Node.js v12 or v14'
|
|
407
335
|
},
|
|
408
|
-
react: {
|
|
409
|
-
range: '16.9.36',
|
|
410
|
-
fix: 'npm i react@16.9.36'
|
|
411
|
-
},
|
|
412
336
|
sp: SharePointVersion.SPO,
|
|
413
337
|
yo: {
|
|
414
338
|
range: '^3',
|
|
@@ -424,10 +348,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
424
348
|
range: '^12 || ^14',
|
|
425
349
|
fix: 'Install Node.js v12 or v14'
|
|
426
350
|
},
|
|
427
|
-
react: {
|
|
428
|
-
range: '16.9.51',
|
|
429
|
-
fix: 'npm i react@16.9.51'
|
|
430
|
-
},
|
|
431
351
|
sp: SharePointVersion.SPO,
|
|
432
352
|
yo: {
|
|
433
353
|
range: '^4',
|
|
@@ -443,10 +363,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
443
363
|
range: '^12 || ^14',
|
|
444
364
|
fix: 'Install Node.js v12 or v14'
|
|
445
365
|
},
|
|
446
|
-
react: {
|
|
447
|
-
range: '16.9.51',
|
|
448
|
-
fix: 'npm i react@16.9.51'
|
|
449
|
-
},
|
|
450
366
|
sp: SharePointVersion.SPO,
|
|
451
367
|
yo: {
|
|
452
368
|
range: '^4',
|
|
@@ -462,10 +378,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
462
378
|
range: '^12 || ^14',
|
|
463
379
|
fix: 'Install Node.js v12 or v14'
|
|
464
380
|
},
|
|
465
|
-
react: {
|
|
466
|
-
range: '16.9.51',
|
|
467
|
-
fix: 'npm i react@16.9.51'
|
|
468
|
-
},
|
|
469
381
|
sp: SharePointVersion.SPO,
|
|
470
382
|
yo: {
|
|
471
383
|
range: '^4',
|
|
@@ -511,7 +423,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
511
423
|
.then(_ => this.checkNodeVersion(prerequisites, fixes, logger))
|
|
512
424
|
.then(_ => this.checkYo(prerequisites, fixes, logger))
|
|
513
425
|
.then(_ => this.checkGulp(prerequisites, fixes, logger))
|
|
514
|
-
.then(_ => this.checkReact(prerequisites, fixes, logger))
|
|
515
426
|
.then(_ => this.checkTypeScript(fixes, logger))
|
|
516
427
|
.then(_ => {
|
|
517
428
|
if (fixes.length > 0) {
|
|
@@ -586,13 +497,6 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
586
497
|
}
|
|
587
498
|
});
|
|
588
499
|
}
|
|
589
|
-
checkReact(prerequisites, fixes, logger) {
|
|
590
|
-
return this
|
|
591
|
-
.getPackageVersion('react', PackageSearchMode.LocalOnly, HandlePromise.Continue, logger)
|
|
592
|
-
.then((reactVersion) => {
|
|
593
|
-
this.checkStatus('react', reactVersion, prerequisites.react, OptionalOrRequired.Optional, fixes, logger);
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
500
|
checkTypeScript(fixes, logger) {
|
|
597
501
|
return this
|
|
598
502
|
.getPackageVersion('typescript', PackageSearchMode.LocalOnly, HandlePromise.Continue, logger)
|
|
@@ -713,15 +617,7 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
713
617
|
return process.version.substr(1);
|
|
714
618
|
}
|
|
715
619
|
checkStatus(what, versionFound, versionCheck, optionalOrRequired, fixes, logger) {
|
|
716
|
-
if (
|
|
717
|
-
// TODO: we might need this code in the future if SPFx introduces required
|
|
718
|
-
// prerequisites with a specific version
|
|
719
|
-
// if (optionalOrRequired === OptionalOrRequired.Required) {
|
|
720
|
-
// logger.log(this.getStatus(CheckStatus.Failure, `${what} not found, v${versionCheck.range} required`));
|
|
721
|
-
// fixes.push(versionCheck.fix);
|
|
722
|
-
// }
|
|
723
|
-
}
|
|
724
|
-
else {
|
|
620
|
+
if (versionFound) {
|
|
725
621
|
if ((0, semver_1.satisfies)(versionFound, versionCheck.range)) {
|
|
726
622
|
logger.log(this.getStatus(CheckStatus.Success, `${what} v${versionFound}`));
|
|
727
623
|
}
|
|
@@ -62,10 +62,10 @@ class SpoFileCheckoutCommand extends SpoCommand_1.default {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
if (args.options.id && args.options.fileUrl) {
|
|
65
|
-
return 'Specify either
|
|
65
|
+
return 'Specify either id or fileUrl but not both';
|
|
66
66
|
}
|
|
67
67
|
if (!args.options.id && !args.options.fileUrl) {
|
|
68
|
-
return 'Specify
|
|
68
|
+
return 'Specify id or fileUrl, one is required';
|
|
69
69
|
}
|
|
70
70
|
return true;
|
|
71
71
|
}
|
|
@@ -50,7 +50,7 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
|
|
|
50
50
|
if (args.options.skipRecycleBin || args.options.wait) {
|
|
51
51
|
logger.logToStderr(chalk.yellow(`Entered site is a groupified site. Hence, the parameters 'skipRecycleBin' and 'wait' will not be applicable.`));
|
|
52
52
|
}
|
|
53
|
-
return this.
|
|
53
|
+
return this.deleteGroup(group.id, logger);
|
|
54
54
|
})
|
|
55
55
|
.catch((err) => {
|
|
56
56
|
if (err.response.status === 404) {
|
|
@@ -79,7 +79,8 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
|
|
|
79
79
|
else {
|
|
80
80
|
return Promise.reject(err);
|
|
81
81
|
}
|
|
82
|
-
})
|
|
82
|
+
})
|
|
83
|
+
.then(_ => this.deleteSite(args.options.url, args.options.wait, logger));
|
|
83
84
|
}
|
|
84
85
|
})
|
|
85
86
|
.then(_ => cb(), (err) => this.handleRejectedPromise(err, logger, cb));
|
|
@@ -296,7 +297,7 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
|
|
|
296
297
|
}
|
|
297
298
|
});
|
|
298
299
|
}
|
|
299
|
-
|
|
300
|
+
deleteGroup(groupId, logger) {
|
|
300
301
|
if (this.verbose) {
|
|
301
302
|
logger.logToStderr(`Removing Microsoft 365 Group: ${groupId}...`);
|
|
302
303
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const config_1 = require("../../../../config");
|
|
4
3
|
const request_1 = require("../../../../request");
|
|
5
4
|
const utils_1 = require("../../../../utils");
|
|
6
5
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
@@ -18,58 +17,25 @@ class SpoTenantRecycleBinItemRestoreCommand extends SpoCommand_1.default {
|
|
|
18
17
|
return telemetryProps;
|
|
19
18
|
}
|
|
20
19
|
commandAction(logger, args, cb) {
|
|
21
|
-
this.dots = '';
|
|
22
20
|
utils_1.spo
|
|
23
21
|
.getSpoAdminUrl(logger, this.debug)
|
|
24
22
|
.then((adminUrl) => {
|
|
25
|
-
this.spoAdminUrl = adminUrl;
|
|
26
|
-
return utils_1.spo.ensureFormDigest(this.spoAdminUrl, logger, this.context, this.debug);
|
|
27
|
-
})
|
|
28
|
-
.then((res) => {
|
|
29
|
-
this.context = res;
|
|
30
|
-
if (this.verbose) {
|
|
31
|
-
logger.logToStderr(`Restoring deleted site collection ${args.options.url}...`);
|
|
32
|
-
}
|
|
33
23
|
const requestOptions = {
|
|
34
|
-
url: `${
|
|
24
|
+
url: `${adminUrl}/_api/SPOInternalUseOnly.Tenant/RestoreDeletedSite`,
|
|
35
25
|
headers: {
|
|
36
|
-
'
|
|
26
|
+
accept: 'application/json;odata=nometadata',
|
|
27
|
+
'content-type': 'application/json;charset=utf-8'
|
|
37
28
|
},
|
|
38
|
-
data:
|
|
29
|
+
data: {
|
|
30
|
+
siteUrl: args.options.url
|
|
31
|
+
}
|
|
39
32
|
};
|
|
40
33
|
return request_1.default.post(requestOptions);
|
|
41
34
|
})
|
|
42
|
-
.then(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (response.ErrorInfo) {
|
|
47
|
-
reject(response.ErrorInfo.ErrorMessage);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
const operation = json[json.length - 1];
|
|
51
|
-
const isComplete = operation.IsComplete;
|
|
52
|
-
if (!args.options.wait || isComplete) {
|
|
53
|
-
resolve();
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
setTimeout(() => {
|
|
57
|
-
utils_1.spo.waitUntilFinished({
|
|
58
|
-
operationId: JSON.stringify(operation._ObjectIdentity_),
|
|
59
|
-
siteUrl: this.spoAdminUrl,
|
|
60
|
-
resolve,
|
|
61
|
-
reject,
|
|
62
|
-
logger,
|
|
63
|
-
currentContext: this.context,
|
|
64
|
-
dots: this.dots,
|
|
65
|
-
debug: this.debug,
|
|
66
|
-
verbose: this.verbose
|
|
67
|
-
});
|
|
68
|
-
}, operation.PollingInterval);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
})
|
|
72
|
-
.then(_ => cb(), (err) => this.handleRejectedPromise(err, logger, cb));
|
|
35
|
+
.then(res => {
|
|
36
|
+
logger.log(JSON.parse(res));
|
|
37
|
+
cb();
|
|
38
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
73
39
|
}
|
|
74
40
|
options() {
|
|
75
41
|
const options = [
|
|
@@ -13,6 +13,14 @@ class SpoTenantSettingsSetCommand extends SpoCommand_1.default {
|
|
|
13
13
|
get description() {
|
|
14
14
|
return 'Sets tenant global settings';
|
|
15
15
|
}
|
|
16
|
+
types() {
|
|
17
|
+
return {
|
|
18
|
+
boolean: [
|
|
19
|
+
'EnableAzureADB2BIntegration',
|
|
20
|
+
'SyncAadB2BManagementPolicy'
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
16
24
|
getTelemetryProperties(args) {
|
|
17
25
|
const telemetryProps = super.getTelemetryProperties(args);
|
|
18
26
|
telemetryProps.MinCompatibilityLevel = (!(!args.options.MinCompatibilityLevel)).toString();
|
|
@@ -97,6 +105,8 @@ class SpoTenantSettingsSetCommand extends SpoCommand_1.default {
|
|
|
97
105
|
telemetryProps.DisabledWebPartIds = (!(!args.options.DisabledWebPartIds)).toString();
|
|
98
106
|
telemetryProps.AllowedDomainListForSyncClient = (!(!args.options.AllowedDomainListForSyncClient)).toString();
|
|
99
107
|
telemetryProps.DisableCustomAppAuthentication = (!(!args.options.DisableCustomAppAuthentication)).toString();
|
|
108
|
+
telemetryProps.EnableAzureADB2BIntegration = typeof args.options.EnableAzureADB2BIntegration !== 'undefined';
|
|
109
|
+
telemetryProps.SyncAadB2BManagementPolicy = typeof args.options.SyncAadB2BManagementPolicy !== 'undefined';
|
|
100
110
|
return telemetryProps;
|
|
101
111
|
}
|
|
102
112
|
getAllEnumOptions() {
|
|
@@ -176,6 +186,9 @@ class SpoTenantSettingsSetCommand extends SpoCommand_1.default {
|
|
|
176
186
|
cb(new Command_1.CommandError(response.ErrorInfo.ErrorMessage));
|
|
177
187
|
return;
|
|
178
188
|
}
|
|
189
|
+
if (args.options.EnableAzureADB2BIntegration === true) {
|
|
190
|
+
this.warn(logger, 'WARNING: Make sure to also enable the Azure AD one-time passcode authentication preview. If it is not enabled then SharePoint will not use Azure AD B2B even if EnableAzureADB2BIntegration is set to true. Learn more at http://aka.ms/spo-b2b-integration.');
|
|
191
|
+
}
|
|
179
192
|
cb();
|
|
180
193
|
}, (err) => this.handleRejectedPromise(err, logger, cb));
|
|
181
194
|
}
|
|
@@ -490,6 +503,14 @@ class SpoTenantSettingsSetCommand extends SpoCommand_1.default {
|
|
|
490
503
|
{
|
|
491
504
|
option: '--DisableCustomAppAuthentication [DisableCustomAppAuthentication]',
|
|
492
505
|
autocomplete: ['true', 'false']
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
option: '--EnableAzureADB2BIntegration [EnableAzureADB2BIntegration]',
|
|
509
|
+
autocomplete: ['true', 'false']
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
option: '--SyncAadB2BManagementPolicy [SyncAadB2BManagementPolicy]',
|
|
513
|
+
autocomplete: ['true', 'false']
|
|
493
514
|
}
|
|
494
515
|
];
|
|
495
516
|
const parentOptions = super.options();
|
|
@@ -72,7 +72,7 @@ class TeamsAppInstallCommand extends GraphCommand_1.default {
|
|
|
72
72
|
options() {
|
|
73
73
|
const options = [
|
|
74
74
|
{ option: '--appId <appId>' },
|
|
75
|
-
{ option: '--teamId [teamId' },
|
|
75
|
+
{ option: '--teamId [teamId]' },
|
|
76
76
|
{ option: '--userId [userId]' },
|
|
77
77
|
{ option: '--userName [userName]' }
|
|
78
78
|
];
|
|
@@ -16,6 +16,8 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
|
|
|
16
16
|
telemetryProps.description = typeof args.options.description !== 'undefined';
|
|
17
17
|
telemetryProps.teamId = typeof args.options.teamId !== 'undefined';
|
|
18
18
|
telemetryProps.teamName = typeof args.options.teamName !== 'undefined';
|
|
19
|
+
telemetryProps.type = args.options.type || 'standard';
|
|
20
|
+
telemetryProps.owner = typeof args.options.owner !== 'undefined';
|
|
19
21
|
return telemetryProps;
|
|
20
22
|
}
|
|
21
23
|
getTeamId(args) {
|
|
@@ -44,23 +46,35 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
|
|
|
44
46
|
return Promise.resolve(matchingTeams[0]);
|
|
45
47
|
});
|
|
46
48
|
}
|
|
49
|
+
createChannel(args, teamId) {
|
|
50
|
+
const requestOptions = {
|
|
51
|
+
url: `${this.resource}/v1.0/teams/${teamId}/channels`,
|
|
52
|
+
headers: {
|
|
53
|
+
accept: 'application/json;odata.metadata=none',
|
|
54
|
+
'content-type': 'application/json;odata=nometadata'
|
|
55
|
+
},
|
|
56
|
+
data: {
|
|
57
|
+
membershipType: args.options.type || 'standard',
|
|
58
|
+
displayName: args.options.name
|
|
59
|
+
},
|
|
60
|
+
responseType: 'json'
|
|
61
|
+
};
|
|
62
|
+
if (args.options.type === 'private') {
|
|
63
|
+
// Private channels must have at least 1 owner
|
|
64
|
+
requestOptions.data.members = [
|
|
65
|
+
{
|
|
66
|
+
'@odata.type': '#microsoft.graph.aadUserConversationMember',
|
|
67
|
+
'user@odata.bind': `https://graph.microsoft.com/v1.0/users('${args.options.owner}')`,
|
|
68
|
+
roles: ['owner']
|
|
69
|
+
}
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
return request_1.default.post(requestOptions);
|
|
73
|
+
}
|
|
47
74
|
commandAction(logger, args, cb) {
|
|
48
75
|
this
|
|
49
76
|
.getTeamId(args)
|
|
50
|
-
.then((teamId) =>
|
|
51
|
-
const requestOptions = {
|
|
52
|
-
url: `${this.resource}/v1.0/teams/${teamId}/channels`,
|
|
53
|
-
headers: {
|
|
54
|
-
accept: 'application/json;odata.metadata=none',
|
|
55
|
-
'content-type': 'application/json;odata=nometadata'
|
|
56
|
-
},
|
|
57
|
-
data: {
|
|
58
|
-
displayName: args.options.name
|
|
59
|
-
},
|
|
60
|
-
responseType: 'json'
|
|
61
|
-
};
|
|
62
|
-
return request_1.default.post(requestOptions);
|
|
63
|
-
})
|
|
77
|
+
.then((teamId) => this.createChannel(args, teamId))
|
|
64
78
|
.then((res) => {
|
|
65
79
|
logger.log(res);
|
|
66
80
|
cb();
|
|
@@ -79,6 +93,13 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
|
|
|
79
93
|
},
|
|
80
94
|
{
|
|
81
95
|
option: '-d, --description [description]'
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
option: '--type [type]',
|
|
99
|
+
autocomplete: ['standard', 'private']
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
option: '--owner [owner]'
|
|
82
103
|
}
|
|
83
104
|
];
|
|
84
105
|
const parentOptions = super.options();
|
|
@@ -94,6 +115,15 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
|
|
|
94
115
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
95
116
|
return `${args.options.teamId} is not a valid GUID`;
|
|
96
117
|
}
|
|
118
|
+
if (args.options.type && ['standard', 'private'].indexOf(args.options.type) === -1) {
|
|
119
|
+
return `${args.options.type} is not a valid type value. Allowed values standard|private.`;
|
|
120
|
+
}
|
|
121
|
+
if (args.options.type === 'private' && !args.options.owner) {
|
|
122
|
+
return 'Specify owner when creating a private channel.';
|
|
123
|
+
}
|
|
124
|
+
if (args.options.type !== 'private' && args.options.owner) {
|
|
125
|
+
return 'Specify owner only when creating a private channel.';
|
|
126
|
+
}
|
|
97
127
|
return true;
|
|
98
128
|
}
|
|
99
129
|
}
|
|
@@ -49,7 +49,10 @@ class TeamsChannelListCommand extends GraphCommand_1.default {
|
|
|
49
49
|
this
|
|
50
50
|
.getTeamId(args)
|
|
51
51
|
.then((teamId) => {
|
|
52
|
-
|
|
52
|
+
let endpoint = `${this.resource}/v1.0/teams/${teamId}/channels`;
|
|
53
|
+
if (args.options.type) {
|
|
54
|
+
endpoint += `?$filter=membershipType eq '${args.options.type}'`;
|
|
55
|
+
}
|
|
53
56
|
return utils_1.odata.getAllItems(endpoint, logger);
|
|
54
57
|
})
|
|
55
58
|
.then((items) => {
|
|
@@ -64,6 +67,10 @@ class TeamsChannelListCommand extends GraphCommand_1.default {
|
|
|
64
67
|
},
|
|
65
68
|
{
|
|
66
69
|
option: '--teamName [teamName]'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
option: '--type [type]',
|
|
73
|
+
autocomplete: ['standard', 'private']
|
|
67
74
|
}
|
|
68
75
|
];
|
|
69
76
|
const parentOptions = super.options();
|
|
@@ -79,6 +86,9 @@ class TeamsChannelListCommand extends GraphCommand_1.default {
|
|
|
79
86
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
80
87
|
return `${args.options.teamId} is not a valid GUID`;
|
|
81
88
|
}
|
|
89
|
+
if (args.options.type && ['standard', 'private'].indexOf(args.options.type.toLowerCase()) === -1) {
|
|
90
|
+
return `${args.options.type} is not a valid type value. Allowed values standard|private`;
|
|
91
|
+
}
|
|
82
92
|
return true;
|
|
83
93
|
}
|
|
84
94
|
}
|
|
@@ -5,13 +5,16 @@ const request_1 = require("../../../../request");
|
|
|
5
5
|
const utils_1 = require("../../../../utils");
|
|
6
6
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
7
7
|
const commands_1 = require("../../commands");
|
|
8
|
-
class
|
|
8
|
+
class TeamsChannelMemberAddCommand extends GraphCommand_1.default {
|
|
9
9
|
get name() {
|
|
10
|
-
return commands_1.default.
|
|
10
|
+
return commands_1.default.CHANNEL_MEMBER_ADD;
|
|
11
11
|
}
|
|
12
12
|
get description() {
|
|
13
13
|
return 'Adds a conversation member in a private channel.';
|
|
14
14
|
}
|
|
15
|
+
alias() {
|
|
16
|
+
return [commands_1.default.CONVERSATIONMEMBER_ADD];
|
|
17
|
+
}
|
|
15
18
|
getTelemetryProperties(args) {
|
|
16
19
|
const telemetryProps = super.getTelemetryProperties(args);
|
|
17
20
|
telemetryProps.teamId = typeof args.options.teamId !== 'undefined';
|
|
@@ -24,6 +27,7 @@ class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
|
|
|
24
27
|
return telemetryProps;
|
|
25
28
|
}
|
|
26
29
|
commandAction(logger, args, cb) {
|
|
30
|
+
this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_ADD, commands_1.default.CHANNEL_MEMBER_ADD);
|
|
27
31
|
let teamId = '';
|
|
28
32
|
let channelId = '';
|
|
29
33
|
this
|
|
@@ -47,6 +51,13 @@ class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
|
|
|
47
51
|
})
|
|
48
52
|
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
49
53
|
}
|
|
54
|
+
optionSets() {
|
|
55
|
+
return [
|
|
56
|
+
['teamId', 'teamName'],
|
|
57
|
+
['channelId', 'channelName'],
|
|
58
|
+
['userId', 'userDisplayName']
|
|
59
|
+
];
|
|
60
|
+
}
|
|
50
61
|
options() {
|
|
51
62
|
const options = [
|
|
52
63
|
{
|
|
@@ -75,30 +86,12 @@ class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
|
|
|
75
86
|
return options.concat(parentOptions);
|
|
76
87
|
}
|
|
77
88
|
validate(args) {
|
|
78
|
-
if (args.options.teamId && args.options.teamName) {
|
|
79
|
-
return 'Specify either teamId or teamName, but not both.';
|
|
80
|
-
}
|
|
81
|
-
if (!args.options.teamId && !args.options.teamName) {
|
|
82
|
-
return 'Specify teamId or teamName, one is required';
|
|
83
|
-
}
|
|
84
89
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
85
90
|
return `${args.options.teamId} is not a valid GUID`;
|
|
86
91
|
}
|
|
87
|
-
if (args.options.channelId && args.options.channelName) {
|
|
88
|
-
return 'Specify either channelId or channelName, but not both.';
|
|
89
|
-
}
|
|
90
|
-
if (!args.options.channelId && !args.options.channelName) {
|
|
91
|
-
return 'Specify channelId or channelName, one is required';
|
|
92
|
-
}
|
|
93
92
|
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
94
93
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
95
94
|
}
|
|
96
|
-
if (args.options.userId && args.options.userDisplayName) {
|
|
97
|
-
return 'Specify either userId or userDisplayName, but not both.';
|
|
98
|
-
}
|
|
99
|
-
if (!args.options.userId && !args.options.userDisplayName) {
|
|
100
|
-
return 'Specify userId or userDisplayName, one is required';
|
|
101
|
-
}
|
|
102
95
|
return true;
|
|
103
96
|
}
|
|
104
97
|
addUser(userId, endpoint, roles) {
|
|
@@ -196,5 +189,5 @@ class TeamsConversationMemberAddCommand extends GraphCommand_1.default {
|
|
|
196
189
|
}, err => { return Promise.reject(err); });
|
|
197
190
|
}
|
|
198
191
|
}
|
|
199
|
-
module.exports = new
|
|
200
|
-
//# sourceMappingURL=
|
|
192
|
+
module.exports = new TeamsChannelMemberAddCommand();
|
|
193
|
+
//# sourceMappingURL=channel-member-add.js.map
|