@pnp/cli-microsoft365 6.0.0-beta.78fdd2c → 6.0.0-beta.80d195f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/Dockerfile +3 -1
- package/.devcontainer/devcontainer.json +1 -0
- package/dist/m365/aad/commands/app/app-add.js +161 -22
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +13 -13
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +14 -14
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +12 -12
- package/dist/m365/aad/commands/o365group/o365group-add.js +2 -7
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +6 -6
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +12 -12
- package/dist/m365/aad/commands/policy/policy-list.js +6 -6
- package/dist/m365/aad/commands/sp/sp-get.js +14 -14
- package/dist/m365/booking/commands/business/business-get.js +86 -0
- package/dist/m365/booking/commands/business/business-list.js +30 -0
- package/dist/m365/booking/commands.js +8 -0
- package/dist/m365/flow/commands/flow-disable.js +2 -2
- package/dist/m365/flow/commands/flow-enable.js +2 -2
- package/dist/m365/flow/commands/flow-export.js +5 -5
- package/dist/m365/flow/commands/flow-get.js +2 -2
- package/dist/m365/flow/commands/flow-list.js +2 -2
- package/dist/m365/flow/commands/flow-remove.js +3 -3
- package/dist/m365/flow/commands/run/run-cancel.js +6 -6
- package/dist/m365/flow/commands/run/run-get.js +4 -4
- package/dist/m365/flow/commands/run/run-list.js +4 -4
- package/dist/m365/flow/commands/run/run-resubmit.js +7 -7
- package/dist/m365/outlook/commands/message/message-move.js +2 -2
- package/dist/m365/pa/commands/connector/connector-export.js +3 -3
- package/dist/m365/pa/commands/connector/connector-list.js +2 -2
- package/dist/m365/pa/commands/solution/solution-reference-add.js +7 -7
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +101 -0
- package/dist/m365/search/commands.js +2 -1
- package/dist/m365/spfx/commands/package/package-generate.js +2 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +1 -1
- package/dist/m365/spo/commands/app/app-add.js +7 -7
- package/dist/m365/spo/commands/app/app-deploy.js +7 -7
- package/dist/m365/spo/commands/app/app-get.js +7 -7
- package/dist/m365/spo/commands/app/app-install.js +6 -6
- package/dist/m365/spo/commands/app/app-list.js +7 -7
- package/dist/m365/spo/commands/app/app-remove.js +7 -7
- package/dist/m365/spo/commands/app/app-retract.js +7 -7
- package/dist/m365/spo/commands/app/app-uninstall.js +6 -6
- package/dist/m365/spo/commands/app/app-upgrade.js +6 -6
- package/dist/m365/spo/commands/apppage/apppage-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +7 -7
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +7 -7
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +13 -13
- package/dist/m365/spo/commands/customaction/customaction-add.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-clear.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-get.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-list.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-remove.js +6 -5
- package/dist/m365/spo/commands/customaction/customaction-set.js +3 -3
- package/dist/m365/spo/commands/feature/feature-disable.js +4 -4
- package/dist/m365/spo/commands/feature/feature-enable.js +5 -5
- package/dist/m365/spo/commands/feature/feature-list.js +3 -3
- package/dist/m365/spo/commands/field/field-get.js +1 -7
- package/dist/m365/spo/commands/field/field-remove.js +1 -7
- package/dist/m365/spo/commands/file/file-checkin.js +8 -8
- package/dist/m365/spo/commands/file/file-checkout.js +8 -8
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +16 -16
- package/dist/m365/spo/commands/folder/folder-get.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +3 -3
- package/dist/m365/spo/commands/folder/folder-rename.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +7 -7
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +6 -6
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-add.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +6 -6
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +208 -0
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +171 -0
- package/dist/m365/spo/commands/list/list-view-field-add.js +23 -23
- package/dist/m365/spo/commands/list/list-view-field-remove.js +14 -14
- package/dist/m365/spo/commands/list/list-view-field-set.js +18 -18
- package/dist/m365/spo/commands/list/list-view-get.js +12 -12
- package/dist/m365/spo/commands/list/list-view-remove.js +14 -14
- package/dist/m365/spo/commands/list/list-view-set.js +14 -14
- package/dist/m365/spo/commands/listitem/listitem-list.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +4 -4
- package/dist/m365/spo/commands/page/page-column-get.js +2 -2
- package/dist/m365/spo/commands/page/page-column-list.js +2 -2
- package/dist/m365/spo/commands/page/page-control-get.js +4 -4
- package/dist/m365/spo/commands/page/page-control-list.js +3 -3
- package/dist/m365/spo/commands/page/page-control-set.js +3 -3
- package/dist/m365/spo/commands/page/page-section-add.js +2 -2
- package/dist/m365/spo/commands/page/page-section-get.js +2 -2
- package/dist/m365/spo/commands/page/page-section-list.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +4 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +4 -4
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +3 -3
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +3 -3
- package/dist/m365/spo/commands/site/site-apppermission-get.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +9 -9
- package/dist/m365/spo/commands/site/site-apppermission-set.js +6 -6
- package/dist/m365/spo/commands/site/site-chrome-set.js +3 -3
- package/dist/m365/spo/commands/site/site-ensure.js +1 -1
- package/dist/m365/spo/commands/site/site-groupify.js +3 -3
- package/dist/m365/spo/commands/site/site-rename.js +9 -9
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +3 -3
- package/dist/m365/spo/commands/web/web-add.js +5 -5
- package/dist/m365/spo/commands/web/web-get.js +3 -3
- package/dist/m365/spo/commands/web/web-list.js +4 -4
- package/dist/m365/spo/commands/web/web-reindex.js +8 -8
- package/dist/m365/spo/commands/web/web-remove.js +5 -5
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +63 -0
- package/dist/m365/spo/commands/web/web-set.js +4 -4
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/teams/commands/app/app-install.js +4 -4
- package/dist/m365/teams/commands/app/app-uninstall.js +3 -3
- package/dist/m365/teams/commands/channel/channel-get.js +19 -19
- package/dist/m365/teams/commands/channel/channel-remove.js +15 -15
- package/dist/m365/teams/commands/channel/channel-set.js +7 -7
- package/dist/m365/teams/commands/chat/chat-get.js +2 -2
- package/dist/m365/teams/commands/chat/chat-message-send.js +2 -2
- package/dist/m365/teams/commands/chat/chatUtil.js +0 -12
- package/dist/m365/teams/commands/message/message-get.js +3 -3
- package/dist/m365/teams/commands/tab/tab-get.js +13 -13
- package/dist/m365/teams/commands/tab/tab-remove.js +6 -6
- package/dist/m365/teams/commands/team/team-archive.js +3 -13
- package/dist/m365/teams/commands/team/team-clone.js +3 -20
- package/dist/m365/teams/commands/team/team-remove.js +2 -11
- package/dist/m365/teams/commands/team/team-set.js +1 -13
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -11
- package/dist/m365/teams/commands/user/user-app-add.js +4 -4
- package/dist/m365/teams/commands/user/user-app-remove.js +3 -3
- package/dist/m365/viva/commands/connections/connections-app-create.js +9 -9
- package/dist/m365/yammer/commands/group/group-user-add.js +8 -8
- package/dist/m365/yammer/commands/group/group-user-remove.js +11 -11
- package/dist/m365/yammer/commands/message/message-like-set.js +5 -5
- package/dist/m365/yammer/commands/user/user-get.js +5 -5
- package/docs/docs/cmd/aad/app/app-add.md +12 -1
- package/docs/docs/cmd/aad/app/app-set.md +1 -1
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.md +5 -5
- package/docs/docs/cmd/aad/o365group/o365group-add.md +3 -3
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-list.md +7 -7
- package/docs/docs/cmd/aad/o365group/o365group-teamify.md +4 -4
- package/docs/docs/cmd/aad/policy/policy-list.md +2 -2
- package/docs/docs/cmd/aad/sp/sp-get.md +5 -5
- package/docs/docs/cmd/booking/business/business-get.md +33 -0
- package/docs/docs/cmd/booking/business/business-list.md +21 -0
- package/docs/docs/cmd/flow/flow-disable.md +3 -3
- package/docs/docs/cmd/flow/flow-enable.md +1 -1
- package/docs/docs/cmd/flow/flow-export.md +5 -5
- package/docs/docs/cmd/flow/flow-get.md +3 -3
- package/docs/docs/cmd/flow/flow-list.md +3 -3
- package/docs/docs/cmd/flow/flow-remove.md +5 -5
- package/docs/docs/cmd/flow/run/run-cancel.md +3 -3
- package/docs/docs/cmd/flow/run/run-get.md +3 -3
- package/docs/docs/cmd/flow/run/run-list.md +3 -3
- package/docs/docs/cmd/flow/run/run-resubmit.md +4 -4
- package/docs/docs/cmd/outlook/message/message-move.md +4 -4
- package/docs/docs/cmd/pa/connector/connector-export.md +3 -3
- package/docs/docs/cmd/pa/connector/connector-list.md +2 -2
- package/docs/docs/cmd/pa/solution/solution-reference-add.md +2 -2
- package/docs/docs/cmd/search/externalconnection/externalconnection-remove.md +40 -0
- package/docs/docs/cmd/spfx/package/package-generate.md +2 -2
- package/docs/docs/cmd/spo/app/app-add.md +2 -2
- package/docs/docs/cmd/spo/app/app-deploy.md +2 -2
- package/docs/docs/cmd/spo/app/app-get.md +2 -2
- package/docs/docs/cmd/spo/app/app-install.md +2 -2
- package/docs/docs/cmd/spo/app/app-list.md +2 -2
- package/docs/docs/cmd/spo/app/app-remove.md +2 -2
- package/docs/docs/cmd/spo/app/app-retract.md +2 -2
- package/docs/docs/cmd/spo/app/app-uninstall.md +2 -2
- package/docs/docs/cmd/spo/app/app-upgrade.md +2 -2
- package/docs/docs/cmd/spo/apppage/apppage-set.md +2 -2
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.md +3 -3
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-add.md +10 -10
- package/docs/docs/cmd/spo/customaction/customaction-clear.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-get.md +5 -5
- package/docs/docs/cmd/spo/customaction/customaction-list.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-remove.md +9 -9
- package/docs/docs/cmd/spo/customaction/customaction-set.md +7 -7
- package/docs/docs/cmd/spo/feature/feature-disable.md +4 -4
- package/docs/docs/cmd/spo/feature/feature-enable.md +2 -2
- package/docs/docs/cmd/spo/feature/feature-list.md +3 -3
- package/docs/docs/cmd/spo/field/field-get.md +0 -3
- package/docs/docs/cmd/spo/field/field-remove.md +0 -3
- package/docs/docs/cmd/spo/file/file-checkin.md +6 -6
- package/docs/docs/cmd/spo/file/file-checkout.md +4 -4
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +7 -7
- package/docs/docs/cmd/spo/folder/folder-get.md +2 -2
- package/docs/docs/cmd/spo/folder/folder-remove.md +3 -3
- package/docs/docs/cmd/spo/folder/folder-rename.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.md +2 -2
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +3 -3
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +78 -0
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +54 -0
- package/docs/docs/cmd/spo/list/list-view-field-add.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-field-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-view-field-set.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-get.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-remove.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-set.md +7 -7
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +5 -5
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +3 -3
- package/docs/docs/cmd/spo/page/page-column-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-column-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-set.md +4 -4
- package/docs/docs/cmd/spo/page/page-section-add.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-list.md +3 -3
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-deny.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-add.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-get.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-set.md +5 -5
- package/docs/docs/cmd/spo/site/site-chrome-set.md +4 -4
- package/docs/docs/cmd/spo/site/site-groupify.md +5 -5
- package/docs/docs/cmd/spo/site/site-rename.md +6 -6
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.md +2 -2
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.md +5 -5
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.md +6 -3
- package/docs/docs/cmd/spo/web/web-add.md +4 -4
- package/docs/docs/cmd/spo/web/web-get.md +3 -3
- package/docs/docs/cmd/spo/web/web-list.md +2 -2
- package/docs/docs/cmd/spo/web/web-reindex.md +2 -2
- package/docs/docs/cmd/spo/web/web-remove.md +2 -2
- package/docs/docs/cmd/spo/web/web-roleinheritance-reset.md +24 -0
- package/docs/docs/cmd/spo/web/web-set.md +9 -9
- package/docs/docs/cmd/teams/app/app-install.md +5 -5
- package/docs/docs/cmd/teams/app/app-uninstall.md +3 -3
- package/docs/docs/cmd/teams/channel/channel-get.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-remove.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-set.md +4 -4
- package/docs/docs/cmd/teams/message/message-get.md +3 -3
- package/docs/docs/cmd/teams/tab/tab-get.md +6 -6
- package/docs/docs/cmd/teams/tab/tab-remove.md +4 -4
- package/docs/docs/cmd/teams/team/team-archive.md +0 -3
- package/docs/docs/cmd/teams/team/team-clone.md +0 -3
- package/docs/docs/cmd/teams/team/team-remove.md +0 -3
- package/docs/docs/cmd/teams/team/team-set.md +0 -3
- package/docs/docs/cmd/teams/team/team-unarchive.md +0 -3
- package/docs/docs/cmd/teams/user/user-app-add.md +3 -3
- package/docs/docs/cmd/teams/user/user-app-remove.md +3 -3
- package/docs/docs/cmd/viva/connections/connections-app-create.md +2 -2
- package/docs/docs/cmd/yammer/group/group-user-add.md +5 -5
- package/docs/docs/cmd/yammer/group/group-user-remove.md +5 -5
- package/docs/docs/cmd/yammer/message/message-like-set.md +4 -4
- package/docs/docs/cmd/yammer/user/user-get.md +2 -2
- package/package.json +11 -1
|
@@ -37,7 +37,7 @@ class TeamsAppUninstallCommand extends GraphCommand_1.default {
|
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
38
|
const uninstallApp = () => {
|
|
39
39
|
const requestOptions = {
|
|
40
|
-
url: `${this.resource}/v1.0/teams/${args.options.teamId}/installedApps/${args.options.
|
|
40
|
+
url: `${this.resource}/v1.0/teams/${args.options.teamId}/installedApps/${args.options.id}`,
|
|
41
41
|
headers: {
|
|
42
42
|
accept: 'application/json;odata.metadata=none'
|
|
43
43
|
}
|
|
@@ -54,7 +54,7 @@ class TeamsAppUninstallCommand extends GraphCommand_1.default {
|
|
|
54
54
|
type: 'confirm',
|
|
55
55
|
name: 'continue',
|
|
56
56
|
default: false,
|
|
57
|
-
message: `Are you sure you want to uninstall the app with id ${args.options.
|
|
57
|
+
message: `Are you sure you want to uninstall the app with id ${args.options.id} from the Microsoft Teams team ${args.options.teamId}?`
|
|
58
58
|
}, (result) => {
|
|
59
59
|
if (!result.continue) {
|
|
60
60
|
cb();
|
|
@@ -74,7 +74,7 @@ _TeamsAppUninstallCommand_instances = new WeakSet(), _TeamsAppUninstallCommand_i
|
|
|
74
74
|
});
|
|
75
75
|
}, _TeamsAppUninstallCommand_initOptions = function _TeamsAppUninstallCommand_initOptions() {
|
|
76
76
|
this.options.unshift({
|
|
77
|
-
option: '--
|
|
77
|
+
option: '--id <id>'
|
|
78
78
|
}, {
|
|
79
79
|
option: '--teamId <teamId>'
|
|
80
80
|
}, {
|
|
@@ -49,14 +49,14 @@ class TeamsChannelGetCommand extends GraphCommand_1.default {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
getChannelId(args) {
|
|
52
|
-
if (args.options.
|
|
53
|
-
return Promise.resolve(args.options.
|
|
52
|
+
if (args.options.id) {
|
|
53
|
+
return Promise.resolve(args.options.id);
|
|
54
54
|
}
|
|
55
55
|
if (args.options.primary) {
|
|
56
56
|
return Promise.resolve('');
|
|
57
57
|
}
|
|
58
58
|
const channelRequestOptions = {
|
|
59
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.
|
|
59
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.name)}'`,
|
|
60
60
|
headers: {
|
|
61
61
|
accept: 'application/json;odata.metadata=none'
|
|
62
62
|
},
|
|
@@ -107,8 +107,8 @@ _TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initT
|
|
|
107
107
|
Object.assign(this.telemetryProperties, {
|
|
108
108
|
teamId: typeof args.options.teamId !== 'undefined',
|
|
109
109
|
teamName: typeof args.options.teamName !== 'undefined',
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
id: typeof args.options.id !== 'undefined',
|
|
111
|
+
name: typeof args.options.name !== 'undefined',
|
|
112
112
|
primary: (!(!args.options.primary)).toString()
|
|
113
113
|
});
|
|
114
114
|
});
|
|
@@ -118,9 +118,9 @@ _TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initT
|
|
|
118
118
|
}, {
|
|
119
119
|
option: '--teamName [teamName]'
|
|
120
120
|
}, {
|
|
121
|
-
option: '-c, --
|
|
121
|
+
option: '-c, --id [id]'
|
|
122
122
|
}, {
|
|
123
|
-
option: '--
|
|
123
|
+
option: '--name [name]'
|
|
124
124
|
}, {
|
|
125
125
|
option: '--primary'
|
|
126
126
|
});
|
|
@@ -135,23 +135,23 @@ _TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initT
|
|
|
135
135
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
136
136
|
return `${args.options.teamId} is not a valid GUID`;
|
|
137
137
|
}
|
|
138
|
-
if (args.options.
|
|
139
|
-
return 'Specify
|
|
138
|
+
if (args.options.id && args.options.name && args.options.primary) {
|
|
139
|
+
return 'Specify id, name or primary';
|
|
140
140
|
}
|
|
141
|
-
if (!args.options.
|
|
142
|
-
return 'Specify
|
|
141
|
+
if (!args.options.id && args.options.name && args.options.primary) {
|
|
142
|
+
return 'Specify id, name or primary.';
|
|
143
143
|
}
|
|
144
|
-
if (args.options.
|
|
145
|
-
return 'Specify
|
|
144
|
+
if (args.options.id && !args.options.name && args.options.primary) {
|
|
145
|
+
return 'Specify id, name or primary.';
|
|
146
146
|
}
|
|
147
|
-
if (args.options.
|
|
148
|
-
return 'Specify
|
|
147
|
+
if (args.options.id && args.options.name && !args.options.primary) {
|
|
148
|
+
return 'Specify id, name or primary.';
|
|
149
149
|
}
|
|
150
|
-
if (!args.options.
|
|
151
|
-
return 'Specify
|
|
150
|
+
if (!args.options.id && !args.options.name && !args.options.primary) {
|
|
151
|
+
return 'Specify id, name or primary, one is required';
|
|
152
152
|
}
|
|
153
|
-
if (args.options.
|
|
154
|
-
return `${args.options.
|
|
153
|
+
if (args.options.id && !utils_1.validation.isValidTeamsChannelId(args.options.id)) {
|
|
154
|
+
return `${args.options.id} is not a valid Teams channel id`;
|
|
155
155
|
}
|
|
156
156
|
return true;
|
|
157
157
|
}));
|
|
@@ -36,9 +36,9 @@ class TeamsChannelRemoveCommand extends GraphCommand_1.default {
|
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
38
|
const removeChannel = () => {
|
|
39
|
-
if (args.options.
|
|
39
|
+
if (args.options.name) {
|
|
40
40
|
const requestOptions = {
|
|
41
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.
|
|
41
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.name)}'`,
|
|
42
42
|
headers: {
|
|
43
43
|
accept: 'application/json;odata.metadata=none'
|
|
44
44
|
},
|
|
@@ -63,9 +63,9 @@ class TeamsChannelRemoveCommand extends GraphCommand_1.default {
|
|
|
63
63
|
})
|
|
64
64
|
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
65
65
|
}
|
|
66
|
-
if (args.options.
|
|
66
|
+
if (args.options.id) {
|
|
67
67
|
const requestOptions = {
|
|
68
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels/${encodeURIComponent(args.options.
|
|
68
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels/${encodeURIComponent(args.options.id)}`,
|
|
69
69
|
headers: {
|
|
70
70
|
accept: 'application/json;odata.metadata=none'
|
|
71
71
|
},
|
|
@@ -80,7 +80,7 @@ class TeamsChannelRemoveCommand extends GraphCommand_1.default {
|
|
|
80
80
|
removeChannel();
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
|
-
const channelName = args.options.
|
|
83
|
+
const channelName = args.options.name ? args.options.name : args.options.id;
|
|
84
84
|
cli_1.Cli.prompt({
|
|
85
85
|
type: 'confirm',
|
|
86
86
|
name: 'continue',
|
|
@@ -100,16 +100,16 @@ class TeamsChannelRemoveCommand extends GraphCommand_1.default {
|
|
|
100
100
|
_TeamsChannelRemoveCommand_instances = new WeakSet(), _TeamsChannelRemoveCommand_initTelemetry = function _TeamsChannelRemoveCommand_initTelemetry() {
|
|
101
101
|
this.telemetry.push((args) => {
|
|
102
102
|
Object.assign(this.telemetryProperties, {
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
id: typeof args.options.id !== 'undefined',
|
|
104
|
+
name: typeof args.options.name !== 'undefined',
|
|
105
105
|
confirm: (!(!args.options.confirm)).toString()
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
}, _TeamsChannelRemoveCommand_initOptions = function _TeamsChannelRemoveCommand_initOptions() {
|
|
109
109
|
this.options.unshift({
|
|
110
|
-
option: '-c, --
|
|
110
|
+
option: '-c, --id [id]'
|
|
111
111
|
}, {
|
|
112
|
-
option: '-n, --
|
|
112
|
+
option: '-n, --name [name]'
|
|
113
113
|
}, {
|
|
114
114
|
option: '-i, --teamId <teamId>'
|
|
115
115
|
}, {
|
|
@@ -117,14 +117,14 @@ _TeamsChannelRemoveCommand_instances = new WeakSet(), _TeamsChannelRemoveCommand
|
|
|
117
117
|
});
|
|
118
118
|
}, _TeamsChannelRemoveCommand_initValidators = function _TeamsChannelRemoveCommand_initValidators() {
|
|
119
119
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
if (args.options.
|
|
121
|
-
return 'Specify
|
|
120
|
+
if (args.options.id && args.options.name) {
|
|
121
|
+
return 'Specify id or name but not both';
|
|
122
122
|
}
|
|
123
|
-
if (!args.options.
|
|
124
|
-
return 'Specify
|
|
123
|
+
if (!args.options.id && !args.options.name) {
|
|
124
|
+
return 'Specify id or name';
|
|
125
125
|
}
|
|
126
|
-
if (args.options.
|
|
127
|
-
return `${args.options.
|
|
126
|
+
if (args.options.id && !utils_1.validation.isValidTeamsChannelId(args.options.id)) {
|
|
127
|
+
return `${args.options.id} is not a valid Teams channel id`;
|
|
128
128
|
}
|
|
129
129
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
130
130
|
return `${args.options.teamId} is not a valid GUID`;
|
|
@@ -35,7 +35,7 @@ class TeamsChannelSetCommand extends GraphCommand_1.default {
|
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args, cb) {
|
|
37
37
|
const requestOptions = {
|
|
38
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.
|
|
38
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.name)}'`,
|
|
39
39
|
headers: {
|
|
40
40
|
accept: 'application/json;odata.metadata=none'
|
|
41
41
|
},
|
|
@@ -64,8 +64,8 @@ class TeamsChannelSetCommand extends GraphCommand_1.default {
|
|
|
64
64
|
}
|
|
65
65
|
mapRequestBody(options) {
|
|
66
66
|
const requestBody = {};
|
|
67
|
-
if (options.
|
|
68
|
-
requestBody.displayName = options.
|
|
67
|
+
if (options.newName) {
|
|
68
|
+
requestBody.displayName = options.newName;
|
|
69
69
|
}
|
|
70
70
|
if (options.description) {
|
|
71
71
|
requestBody.description = options.description;
|
|
@@ -76,7 +76,7 @@ class TeamsChannelSetCommand extends GraphCommand_1.default {
|
|
|
76
76
|
_TeamsChannelSetCommand_instances = new WeakSet(), _TeamsChannelSetCommand_initTelemetry = function _TeamsChannelSetCommand_initTelemetry() {
|
|
77
77
|
this.telemetry.push((args) => {
|
|
78
78
|
Object.assign(this.telemetryProperties, {
|
|
79
|
-
|
|
79
|
+
newName: typeof args.options.newName !== 'undefined',
|
|
80
80
|
description: typeof args.options.description !== 'undefined'
|
|
81
81
|
});
|
|
82
82
|
});
|
|
@@ -84,9 +84,9 @@ _TeamsChannelSetCommand_instances = new WeakSet(), _TeamsChannelSetCommand_initT
|
|
|
84
84
|
this.options.unshift({
|
|
85
85
|
option: '-i, --teamId <teamId>'
|
|
86
86
|
}, {
|
|
87
|
-
option: '--
|
|
87
|
+
option: '--name <name>'
|
|
88
88
|
}, {
|
|
89
|
-
option: '--
|
|
89
|
+
option: '--newName [newName]'
|
|
90
90
|
}, {
|
|
91
91
|
option: '--description [description]'
|
|
92
92
|
});
|
|
@@ -95,7 +95,7 @@ _TeamsChannelSetCommand_instances = new WeakSet(), _TeamsChannelSetCommand_initT
|
|
|
95
95
|
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
96
96
|
return `${args.options.teamId} is not a valid GUID`;
|
|
97
97
|
}
|
|
98
|
-
if (args.options.
|
|
98
|
+
if (args.options.name.toLowerCase() === "general") {
|
|
99
99
|
return 'General channel cannot be updated';
|
|
100
100
|
}
|
|
101
101
|
return true;
|
|
@@ -70,7 +70,7 @@ class TeamsChatGetCommand extends GraphCommand_1.default {
|
|
|
70
70
|
}
|
|
71
71
|
getChatIdByParticipants(participantsString) {
|
|
72
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
const participants =
|
|
73
|
+
const participants = participantsString.trim().toLowerCase().split(',').filter(e => e && e !== '');
|
|
74
74
|
const currentUserEmail = accessToken_1.accessToken.getUserNameFromAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken).toLowerCase();
|
|
75
75
|
const existingChats = yield chatUtil_1.chatUtil.findExistingChatsByParticipants([currentUserEmail, ...participants]);
|
|
76
76
|
if (!existingChats || existingChats.length === 0) {
|
|
@@ -140,7 +140,7 @@ _TeamsChatGetCommand_instances = new WeakSet(), _TeamsChatGetCommand_initTelemet
|
|
|
140
140
|
return `${args.options.id} is not a valid Teams ChatId.`;
|
|
141
141
|
}
|
|
142
142
|
if (args.options.participants) {
|
|
143
|
-
const participants =
|
|
143
|
+
const participants = args.options.participants.trim().toLowerCase().split(',').filter(e => e && e !== '');
|
|
144
144
|
if (!participants || participants.length === 0 || participants.some(e => !validation_1.validation.isValidUserPrincipalName(e))) {
|
|
145
145
|
return `${args.options.participants} contains one or more invalid email addresses.`;
|
|
146
146
|
}
|
|
@@ -56,7 +56,7 @@ class TeamsChatMessageSendCommand extends GraphCommand_1.default {
|
|
|
56
56
|
}
|
|
57
57
|
ensureChatIdByUserEmails(userEmailsOption) {
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
const userEmails =
|
|
59
|
+
const userEmails = userEmailsOption.trim().toLowerCase().split(',').filter(e => e && e !== '');
|
|
60
60
|
const currentUserEmail = utils_1.accessToken.getUserNameFromAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken).toLowerCase();
|
|
61
61
|
const existingChats = yield chatUtil_1.chatUtil.findExistingChatsByParticipants([currentUserEmail, ...userEmails]);
|
|
62
62
|
if (!existingChats || existingChats.length === 0) {
|
|
@@ -185,7 +185,7 @@ _TeamsChatMessageSendCommand_instances = new WeakSet(), _TeamsChatMessageSendCom
|
|
|
185
185
|
return `${args.options.chatId} is not a valid Teams ChatId.`;
|
|
186
186
|
}
|
|
187
187
|
if (args.options.userEmails) {
|
|
188
|
-
const userEmails =
|
|
188
|
+
const userEmails = args.options.userEmails.trim().toLowerCase().split(',').filter(e => e && e !== '');
|
|
189
189
|
if (!userEmails || userEmails.length === 0 || userEmails.some(e => !utils_1.validation.isValidUserPrincipalName(e))) {
|
|
190
190
|
return `${args.options.userEmails} contains one or more invalid email addresses.`;
|
|
191
191
|
}
|
|
@@ -45,18 +45,6 @@ exports.chatUtil = {
|
|
|
45
45
|
const endpoint = `https://graph.microsoft.com/v1.0/chats?$filter=topic eq '${encodeURIComponent(name).replace("'", "''")}'&$expand=members&$select=id,topic,createdDateTime,chatType`;
|
|
46
46
|
return odata_1.odata.getAllItems(endpoint);
|
|
47
47
|
});
|
|
48
|
-
},
|
|
49
|
-
/**
|
|
50
|
-
* Converts a comma or space separated string into an array.
|
|
51
|
-
* @param value the string to convert
|
|
52
|
-
*/
|
|
53
|
-
convertParticipantStringToArray(value) {
|
|
54
|
-
if (value.indexOf(',') === -1) {
|
|
55
|
-
return value.trim().toLowerCase().split(' ').filter(e => e && e !== '');
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
return value.trim().toLowerCase().split(',').filter(e => e && e !== '');
|
|
59
|
-
}
|
|
60
48
|
}
|
|
61
49
|
};
|
|
62
50
|
//# sourceMappingURL=chatUtil.js.map
|
|
@@ -34,7 +34,7 @@ class TeamsMessageGetCommand extends GraphCommand_1.default {
|
|
|
34
34
|
}
|
|
35
35
|
commandAction(logger, args, cb) {
|
|
36
36
|
const requestOptions = {
|
|
37
|
-
url: `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${args.options.channelId}/messages/${args.options.
|
|
37
|
+
url: `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${args.options.channelId}/messages/${args.options.id}`,
|
|
38
38
|
headers: {
|
|
39
39
|
accept: 'application/json;odata.metadata=none'
|
|
40
40
|
},
|
|
@@ -50,11 +50,11 @@ class TeamsMessageGetCommand extends GraphCommand_1.default {
|
|
|
50
50
|
}
|
|
51
51
|
_TeamsMessageGetCommand_instances = new WeakSet(), _TeamsMessageGetCommand_initOptions = function _TeamsMessageGetCommand_initOptions() {
|
|
52
52
|
this.options.unshift({
|
|
53
|
-
option: '-
|
|
53
|
+
option: '-t, --teamId <teamId>'
|
|
54
54
|
}, {
|
|
55
55
|
option: '-c, --channelId <channelId>'
|
|
56
56
|
}, {
|
|
57
|
-
option: '-
|
|
57
|
+
option: '-i, --id <id>'
|
|
58
58
|
});
|
|
59
59
|
}, _TeamsMessageGetCommand_initValidators = function _TeamsMessageGetCommand_initValidators() {
|
|
60
60
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -71,11 +71,11 @@ class TeamsTabGetCommand extends GraphCommand_1.default {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
getTabId(args) {
|
|
74
|
-
if (args.options.
|
|
75
|
-
return Promise.resolve(args.options.
|
|
74
|
+
if (args.options.id) {
|
|
75
|
+
return Promise.resolve(args.options.id);
|
|
76
76
|
}
|
|
77
77
|
const tabRequestOptions = {
|
|
78
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels/${encodeURIComponent(this.channelId)}/tabs?$filter=displayName eq '${encodeURIComponent(args.options.
|
|
78
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels/${encodeURIComponent(this.channelId)}/tabs?$filter=displayName eq '${encodeURIComponent(args.options.name)}'`,
|
|
79
79
|
headers: {
|
|
80
80
|
accept: 'application/json;odata.metadata=none'
|
|
81
81
|
},
|
|
@@ -126,8 +126,8 @@ _TeamsTabGetCommand_instances = new WeakSet(), _TeamsTabGetCommand_initTelemetry
|
|
|
126
126
|
teamName: typeof args.options.teamName !== 'undefined',
|
|
127
127
|
channelId: typeof args.options.channelId !== 'undefined',
|
|
128
128
|
channelName: typeof args.options.channelName !== 'undefined',
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
id: typeof args.options.id !== 'undefined',
|
|
130
|
+
name: typeof args.options.name !== 'undefined'
|
|
131
131
|
});
|
|
132
132
|
});
|
|
133
133
|
}, _TeamsTabGetCommand_initOptions = function _TeamsTabGetCommand_initOptions() {
|
|
@@ -140,9 +140,9 @@ _TeamsTabGetCommand_instances = new WeakSet(), _TeamsTabGetCommand_initTelemetry
|
|
|
140
140
|
}, {
|
|
141
141
|
option: '--channelName [channelName]'
|
|
142
142
|
}, {
|
|
143
|
-
option: '-i, --
|
|
143
|
+
option: '-i, --id [id]'
|
|
144
144
|
}, {
|
|
145
|
-
option: '-n, --
|
|
145
|
+
option: '-n, --name [name]'
|
|
146
146
|
});
|
|
147
147
|
}, _TeamsTabGetCommand_initValidators = function _TeamsTabGetCommand_initValidators() {
|
|
148
148
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -164,14 +164,14 @@ _TeamsTabGetCommand_instances = new WeakSet(), _TeamsTabGetCommand_initTelemetry
|
|
|
164
164
|
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
165
165
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
166
166
|
}
|
|
167
|
-
if (args.options.
|
|
168
|
-
return 'Specify either
|
|
167
|
+
if (args.options.id && args.options.name) {
|
|
168
|
+
return 'Specify either id or name, but not both.';
|
|
169
169
|
}
|
|
170
|
-
if (!args.options.
|
|
171
|
-
return 'Specify
|
|
170
|
+
if (!args.options.id && !args.options.name) {
|
|
171
|
+
return 'Specify id or name, one is required';
|
|
172
172
|
}
|
|
173
|
-
if (args.options.
|
|
174
|
-
return `${args.options.
|
|
173
|
+
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
174
|
+
return `${args.options.id} is not a valid GUID`;
|
|
175
175
|
}
|
|
176
176
|
return true;
|
|
177
177
|
}));
|
|
@@ -37,7 +37,7 @@ class TeamsTabRemoveCommand extends GraphCommand_1.default {
|
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
38
|
const removeTab = () => {
|
|
39
39
|
const requestOptions = {
|
|
40
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels/${args.options.channelId}/tabs/${encodeURIComponent(args.options.
|
|
40
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels/${args.options.channelId}/tabs/${encodeURIComponent(args.options.id)}`,
|
|
41
41
|
headers: {
|
|
42
42
|
accept: "application/json;odata.metadata=none"
|
|
43
43
|
},
|
|
@@ -53,7 +53,7 @@ class TeamsTabRemoveCommand extends GraphCommand_1.default {
|
|
|
53
53
|
type: "confirm",
|
|
54
54
|
name: "continue",
|
|
55
55
|
default: false,
|
|
56
|
-
message: `Are you sure you want to remove the tab with id ${args.options.
|
|
56
|
+
message: `Are you sure you want to remove the tab with id ${args.options.id} from channel ${args.options.channelId} in team ${args.options.teamId}?`
|
|
57
57
|
}, (result) => {
|
|
58
58
|
if (!result.continue) {
|
|
59
59
|
cb();
|
|
@@ -73,11 +73,11 @@ _TeamsTabRemoveCommand_instances = new WeakSet(), _TeamsTabRemoveCommand_initTel
|
|
|
73
73
|
});
|
|
74
74
|
}, _TeamsTabRemoveCommand_initOptions = function _TeamsTabRemoveCommand_initOptions() {
|
|
75
75
|
this.options.unshift({
|
|
76
|
-
option: "-
|
|
76
|
+
option: "-t, --teamId <teamId>"
|
|
77
77
|
}, {
|
|
78
78
|
option: "-c, --channelId <channelId>"
|
|
79
79
|
}, {
|
|
80
|
-
option: "-
|
|
80
|
+
option: "-i, --id <id>"
|
|
81
81
|
}, {
|
|
82
82
|
option: "--confirm"
|
|
83
83
|
});
|
|
@@ -89,8 +89,8 @@ _TeamsTabRemoveCommand_instances = new WeakSet(), _TeamsTabRemoveCommand_initTel
|
|
|
89
89
|
if (!utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
90
90
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
91
91
|
}
|
|
92
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
93
|
-
return `${args.options.
|
|
92
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
93
|
+
return `${args.options.id} is not a valid GUID`;
|
|
94
94
|
}
|
|
95
95
|
return true;
|
|
96
96
|
}));
|
|
@@ -48,10 +48,6 @@ class TeamsTeamArchiveCommand extends GraphCommand_1.default {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
commandAction(logger, args, cb) {
|
|
51
|
-
if (args.options.teamId) {
|
|
52
|
-
args.options.id = args.options.teamId;
|
|
53
|
-
this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
|
|
54
|
-
}
|
|
55
51
|
const siteReadOnlyForMembers = args.options.shouldSetSpoSiteReadOnlyForMembers === true;
|
|
56
52
|
this
|
|
57
53
|
.getTeamId(args)
|
|
@@ -77,8 +73,7 @@ _TeamsTeamArchiveCommand_instances = new WeakSet(), _TeamsTeamArchiveCommand_ini
|
|
|
77
73
|
Object.assign(this.telemetryProperties, {
|
|
78
74
|
id: typeof args.options.id !== 'undefined',
|
|
79
75
|
name: typeof args.options.name !== 'undefined',
|
|
80
|
-
shouldSetSpoSiteReadOnlyForMembers: args.options.shouldSetSpoSiteReadOnlyForMembers === true
|
|
81
|
-
teamId: typeof args.options.teamId !== 'undefined'
|
|
76
|
+
shouldSetSpoSiteReadOnlyForMembers: args.options.shouldSetSpoSiteReadOnlyForMembers === true
|
|
82
77
|
});
|
|
83
78
|
});
|
|
84
79
|
}, _TeamsTeamArchiveCommand_initOptions = function _TeamsTeamArchiveCommand_initOptions() {
|
|
@@ -86,22 +81,17 @@ _TeamsTeamArchiveCommand_instances = new WeakSet(), _TeamsTeamArchiveCommand_ini
|
|
|
86
81
|
option: '-i, --id [id]'
|
|
87
82
|
}, {
|
|
88
83
|
option: '-n, --name [name]'
|
|
89
|
-
}, {
|
|
90
|
-
option: '--teamId [teamId]'
|
|
91
84
|
}, {
|
|
92
85
|
option: '--shouldSetSpoSiteReadOnlyForMembers'
|
|
93
86
|
});
|
|
94
87
|
}, _TeamsTeamArchiveCommand_initValidators = function _TeamsTeamArchiveCommand_initValidators() {
|
|
95
88
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
if (!args.options.id && !args.options.name
|
|
89
|
+
if (!args.options.id && !args.options.name) {
|
|
97
90
|
return 'Specify either id or name';
|
|
98
91
|
}
|
|
99
|
-
if (args.options.name &&
|
|
92
|
+
if (args.options.name && args.options.id) {
|
|
100
93
|
return 'Specify either id or name but not both';
|
|
101
94
|
}
|
|
102
|
-
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
103
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
104
|
-
}
|
|
105
95
|
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
106
96
|
return `${args.options.id} is not a valid GUID`;
|
|
107
97
|
}
|
|
@@ -35,14 +35,6 @@ class TeamsTeamCloneCommand extends GraphCommand_1.default {
|
|
|
35
35
|
return 'Creates a clone of a Microsoft Teams team';
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
|
-
if (args.options.teamId) {
|
|
39
|
-
args.options.id = args.options.teamId;
|
|
40
|
-
this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
|
|
41
|
-
}
|
|
42
|
-
if (args.options.displayName) {
|
|
43
|
-
args.options.name = args.options.displayName;
|
|
44
|
-
this.warn(logger, `Option 'displayName' is deprecated. Please use 'name' instead.`);
|
|
45
|
-
}
|
|
46
38
|
const data = {
|
|
47
39
|
displayName: args.options.name,
|
|
48
40
|
mailNickname: this.generateMailNickname(args.options.name),
|
|
@@ -92,20 +84,14 @@ _TeamsTeamCloneCommand_instances = new WeakSet(), _TeamsTeamCloneCommand_initTel
|
|
|
92
84
|
classification: typeof args.options.classification !== 'undefined',
|
|
93
85
|
visibility: typeof args.options.visibility !== 'undefined',
|
|
94
86
|
id: typeof args.options.id !== 'undefined',
|
|
95
|
-
|
|
96
|
-
name: typeof args.options.name !== 'undefined',
|
|
97
|
-
displayName: typeof args.options.displayName !== 'undefined'
|
|
87
|
+
name: typeof args.options.name !== 'undefined'
|
|
98
88
|
});
|
|
99
89
|
});
|
|
100
90
|
}, _TeamsTeamCloneCommand_initOptions = function _TeamsTeamCloneCommand_initOptions() {
|
|
101
91
|
this.options.unshift({
|
|
102
|
-
option: '-i, --id [
|
|
103
|
-
}, {
|
|
104
|
-
option: '--teamId [teamId]'
|
|
92
|
+
option: '-i, --id [id]'
|
|
105
93
|
}, {
|
|
106
94
|
option: '-n, --name [name]'
|
|
107
|
-
}, {
|
|
108
|
-
option: '--displayName [displayName]'
|
|
109
95
|
}, {
|
|
110
96
|
option: '-p, --partsToClone <partsToClone>',
|
|
111
97
|
autocomplete: ['apps', 'channels', 'members', 'settings', 'tabs']
|
|
@@ -119,9 +105,6 @@ _TeamsTeamCloneCommand_instances = new WeakSet(), _TeamsTeamCloneCommand_initTel
|
|
|
119
105
|
});
|
|
120
106
|
}, _TeamsTeamCloneCommand_initValidators = function _TeamsTeamCloneCommand_initValidators() {
|
|
121
107
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
122
|
-
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
123
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
124
|
-
}
|
|
125
108
|
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
126
109
|
return `${args.options.id} is not a valid GUID`;
|
|
127
110
|
}
|
|
@@ -146,7 +129,7 @@ _TeamsTeamCloneCommand_instances = new WeakSet(), _TeamsTeamCloneCommand_initTel
|
|
|
146
129
|
return true;
|
|
147
130
|
}));
|
|
148
131
|
}, _TeamsTeamCloneCommand_initOptionSets = function _TeamsTeamCloneCommand_initOptionSets() {
|
|
149
|
-
this.optionSets.push(['id', '
|
|
132
|
+
this.optionSets.push(['id', 'name']);
|
|
150
133
|
};
|
|
151
134
|
module.exports = new TeamsTeamCloneCommand();
|
|
152
135
|
//# sourceMappingURL=team-clone.js.map
|
|
@@ -49,10 +49,6 @@ class TeamsTeamRemoveCommand extends GraphCommand_1.default {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
commandAction(logger, args, cb) {
|
|
52
|
-
if (args.options.teamId) {
|
|
53
|
-
args.options.id = args.options.teamId;
|
|
54
|
-
this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
|
|
55
|
-
}
|
|
56
52
|
const removeTeam = () => {
|
|
57
53
|
this
|
|
58
54
|
.getTeamId(args)
|
|
@@ -99,22 +95,17 @@ _TeamsTeamRemoveCommand_instances = new WeakSet(), _TeamsTeamRemoveCommand_initT
|
|
|
99
95
|
option: '-i, --id [id]'
|
|
100
96
|
}, {
|
|
101
97
|
option: '-n, --name [name]'
|
|
102
|
-
}, {
|
|
103
|
-
option: '--teamId [teamId]'
|
|
104
98
|
}, {
|
|
105
99
|
option: '--confirm'
|
|
106
100
|
});
|
|
107
101
|
}, _TeamsTeamRemoveCommand_initValidators = function _TeamsTeamRemoveCommand_initValidators() {
|
|
108
102
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
if (!args.options.id && !args.options.name
|
|
103
|
+
if (!args.options.id && !args.options.name) {
|
|
110
104
|
return 'Specify either id or name';
|
|
111
105
|
}
|
|
112
|
-
if (args.options.name &&
|
|
106
|
+
if (args.options.name && args.options.id) {
|
|
113
107
|
return 'Specify either id or name but not both';
|
|
114
108
|
}
|
|
115
|
-
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
116
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
117
|
-
}
|
|
118
109
|
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
119
110
|
return `${args.options.id} is not a valid GUID`;
|
|
120
111
|
}
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsTeamSetCommand_instances, _TeamsTeamSetCommand_initTelemetry, _TeamsTeamSetCommand_initOptions, _TeamsTeamSetCommand_initValidators
|
|
16
|
+
var _TeamsTeamSetCommand_instances, _TeamsTeamSetCommand_initTelemetry, _TeamsTeamSetCommand_initOptions, _TeamsTeamSetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,7 +26,6 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _TeamsTeamSetCommand_instances, "m", _TeamsTeamSetCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _TeamsTeamSetCommand_instances, "m", _TeamsTeamSetCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsTeamSetCommand_instances, "m", _TeamsTeamSetCommand_initValidators).call(this);
|
|
29
|
-
__classPrivateFieldGet(this, _TeamsTeamSetCommand_instances, "m", _TeamsTeamSetCommand_initOptionSets).call(this);
|
|
30
29
|
}
|
|
31
30
|
get name() {
|
|
32
31
|
return commands_1.default.TEAM_SET;
|
|
@@ -54,10 +53,6 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
|
|
|
54
53
|
return requestBody;
|
|
55
54
|
}
|
|
56
55
|
commandAction(logger, args, cb) {
|
|
57
|
-
if (args.options.teamId) {
|
|
58
|
-
args.options.id = args.options.teamId;
|
|
59
|
-
this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
|
|
60
|
-
}
|
|
61
56
|
if (args.options.displayName) {
|
|
62
57
|
args.options.name = args.options.displayName;
|
|
63
58
|
this.warn(logger, `Option 'displayName' is deprecated. Please use 'name' instead.`);
|
|
@@ -85,8 +80,6 @@ _TeamsTeamSetCommand_instances = new WeakSet(), _TeamsTeamSetCommand_initTelemet
|
|
|
85
80
|
}, _TeamsTeamSetCommand_initOptions = function _TeamsTeamSetCommand_initOptions() {
|
|
86
81
|
this.options.unshift({
|
|
87
82
|
option: '-i, --id [id]'
|
|
88
|
-
}, {
|
|
89
|
-
option: '--teamId [teamId]'
|
|
90
83
|
}, {
|
|
91
84
|
option: '-n, --name [name]'
|
|
92
85
|
}, {
|
|
@@ -103,9 +96,6 @@ _TeamsTeamSetCommand_instances = new WeakSet(), _TeamsTeamSetCommand_initTelemet
|
|
|
103
96
|
});
|
|
104
97
|
}, _TeamsTeamSetCommand_initValidators = function _TeamsTeamSetCommand_initValidators() {
|
|
105
98
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
107
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
108
|
-
}
|
|
109
99
|
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
110
100
|
return `${args.options.id} is not a valid GUID`;
|
|
111
101
|
}
|
|
@@ -116,8 +106,6 @@ _TeamsTeamSetCommand_instances = new WeakSet(), _TeamsTeamSetCommand_initTelemet
|
|
|
116
106
|
}
|
|
117
107
|
return true;
|
|
118
108
|
}));
|
|
119
|
-
}, _TeamsTeamSetCommand_initOptionSets = function _TeamsTeamSetCommand_initOptionSets() {
|
|
120
|
-
this.optionSets.push(['id', 'teamId']);
|
|
121
109
|
};
|
|
122
110
|
TeamsTeamSetCommand.props = [
|
|
123
111
|
'displayName',
|
|
@@ -47,10 +47,6 @@ class TeamsTeamUnarchiveCommand extends GraphCommand_1.default {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
commandAction(logger, args, cb) {
|
|
50
|
-
if (args.options.teamId) {
|
|
51
|
-
args.options.id = args.options.teamId;
|
|
52
|
-
this.warn(logger, `Option 'teamId' is deprecated. Please use 'id' instead.`);
|
|
53
|
-
}
|
|
54
50
|
const endpoint = `${this.resource}/v1.0`;
|
|
55
51
|
this
|
|
56
52
|
.getTeamId(args)
|
|
@@ -73,20 +69,15 @@ _TeamsTeamUnarchiveCommand_instances = new WeakSet(), _TeamsTeamUnarchiveCommand
|
|
|
73
69
|
option: '-i, --id [id]'
|
|
74
70
|
}, {
|
|
75
71
|
option: '-n, --name [name]'
|
|
76
|
-
}, {
|
|
77
|
-
option: '--teamId [teamId]'
|
|
78
72
|
});
|
|
79
73
|
}, _TeamsTeamUnarchiveCommand_initValidators = function _TeamsTeamUnarchiveCommand_initValidators() {
|
|
80
74
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
if (!args.options.id && !args.options.name
|
|
75
|
+
if (!args.options.id && !args.options.name) {
|
|
82
76
|
return 'Specify either id or name';
|
|
83
77
|
}
|
|
84
|
-
if (args.options.name &&
|
|
78
|
+
if (args.options.name && args.options.id) {
|
|
85
79
|
return 'Specify either id or name but not both';
|
|
86
80
|
}
|
|
87
|
-
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
88
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
89
|
-
}
|
|
90
81
|
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
91
82
|
return `${args.options.id} is not a valid GUID`;
|
|
92
83
|
}
|