@pnp/cli-microsoft365 5.2.0-beta.a814a27 → 5.2.0-beta.ae0f54c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +0 -1
- package/dist/Command.js +4 -0
- package/dist/m365/aad/commands/user/user-signin-list.js +81 -0
- package/dist/m365/aad/commands.js +2 -1
- 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.4.1.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.9.1.js +2 -0
- package/dist/m365/spo/commands/file/file-checkout.js +2 -2
- 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-membership-list.js → channel-member-list.js} +14 -7
- package/dist/m365/teams/commands/channel/channel-member-set.js +206 -0
- package/dist/m365/teams/commands.js +3 -1
- 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/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-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/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/package.json +2 -1
- package/dist/m365/teams/commands/conversationmember/conversationmember-list.js +0 -164
- package/docs/docs/cmd/teams/channel/channel-membership-list.md +0 -48
- package/docs/docs/cmd/teams/conversationmember/conversationmember-list.md +0 -39
package/.eslintrc.js
CHANGED
package/dist/Command.js
CHANGED
|
@@ -47,6 +47,10 @@ class Command {
|
|
|
47
47
|
logger.logToStderr(chalk.yellow(`Command '${deprecated}' is deprecated. Please use '${recommended}' instead`));
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
warn(logger, warning) {
|
|
51
|
+
const chalk = require('chalk');
|
|
52
|
+
logger.logToStderr(chalk.yellow(warning));
|
|
53
|
+
}
|
|
50
54
|
getUsedCommandName() {
|
|
51
55
|
const cli = cli_1.Cli.getInstance();
|
|
52
56
|
const commandName = this.getCommandName();
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../../../../utils");
|
|
4
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class AadUserSigninListCommand extends GraphCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.USER_SIGNIN_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Retrieves the Azure AD user sign-ins for the tenant';
|
|
12
|
+
}
|
|
13
|
+
getTelemetryProperties(args) {
|
|
14
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
15
|
+
telemetryProps.userName = typeof args.options.userName !== 'undefined';
|
|
16
|
+
telemetryProps.userId = typeof args.options.userId !== 'undefined';
|
|
17
|
+
telemetryProps.appDisplayName = typeof args.options.appDisplayName !== 'undefined';
|
|
18
|
+
telemetryProps.appId = typeof args.options.appId !== 'undefined';
|
|
19
|
+
return telemetryProps;
|
|
20
|
+
}
|
|
21
|
+
defaultProperties() {
|
|
22
|
+
return ['id', 'userPrincipalName', 'appId', 'appDisplayName', 'createdDateTime'];
|
|
23
|
+
}
|
|
24
|
+
commandAction(logger, args, cb) {
|
|
25
|
+
let endpoint = `${this.resource}/v1.0/auditLogs/signIns`;
|
|
26
|
+
let filter = "";
|
|
27
|
+
if (args.options.userName || args.options.userId) {
|
|
28
|
+
filter = args.options.userId ?
|
|
29
|
+
`?$filter=userId eq '${encodeURIComponent(args.options.userId)}'` :
|
|
30
|
+
`?$filter=userPrincipalName eq '${encodeURIComponent(args.options.userName)}'`;
|
|
31
|
+
}
|
|
32
|
+
if (args.options.appId || args.options.appDisplayName) {
|
|
33
|
+
filter += filter ? " and " : "?$filter=";
|
|
34
|
+
filter += args.options.appId ?
|
|
35
|
+
`appId eq '${encodeURIComponent(args.options.appId)}'` :
|
|
36
|
+
`appDisplayName eq '${encodeURIComponent(args.options.appDisplayName)}'`;
|
|
37
|
+
}
|
|
38
|
+
endpoint += filter;
|
|
39
|
+
utils_1.odata
|
|
40
|
+
.getAllItems(endpoint, logger)
|
|
41
|
+
.then((signins) => {
|
|
42
|
+
logger.log(signins);
|
|
43
|
+
cb();
|
|
44
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
45
|
+
}
|
|
46
|
+
options() {
|
|
47
|
+
const options = [
|
|
48
|
+
{
|
|
49
|
+
option: '-n, --userName [userName]'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
option: '--userId [userId]'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
option: '--appDisplayName [appDisplayName]'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
option: '--appId [appId]'
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
const parentOptions = super.options();
|
|
62
|
+
return options.concat(parentOptions);
|
|
63
|
+
}
|
|
64
|
+
validate(args) {
|
|
65
|
+
if (args.options.userId && args.options.userName) {
|
|
66
|
+
return 'Specify either userId or userName, but not both';
|
|
67
|
+
}
|
|
68
|
+
if (args.options.appId && args.options.appDisplayName) {
|
|
69
|
+
return 'Specify either appId or appDisplayName, but not both';
|
|
70
|
+
}
|
|
71
|
+
if (args.options.userId && !utils_1.validation.isValidGuid(args.options.userId)) {
|
|
72
|
+
return `${args.options.userId} is not a valid GUID`;
|
|
73
|
+
}
|
|
74
|
+
if (args.options.appId && !utils_1.validation.isValidGuid(args.options.appId)) {
|
|
75
|
+
return `${args.options.appId} is not a valid GUID`;
|
|
76
|
+
}
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
module.exports = new AadUserSigninListCommand();
|
|
81
|
+
//# sourceMappingURL=user-signin-list.js.map
|
|
@@ -59,6 +59,7 @@ exports.default = {
|
|
|
59
59
|
USER_HIBP: `${prefix} user hibp`,
|
|
60
60
|
USER_LIST: `${prefix} user list`,
|
|
61
61
|
USER_PASSWORD_VALIDATE: `${prefix} user password validate`,
|
|
62
|
-
USER_SET: `${prefix} user set
|
|
62
|
+
USER_SET: `${prefix} user set`,
|
|
63
|
+
USER_SIGNIN_LIST: `${prefix} user signin list`
|
|
63
64
|
};
|
|
64
65
|
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class PpEnvironmentListCommand extends PowerPlatformCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.ENVIRONMENT_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists Microsoft Power Platform environments';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['name', 'displayName'];
|
|
15
|
+
}
|
|
16
|
+
commandAction(logger, args, cb) {
|
|
17
|
+
if (this.verbose) {
|
|
18
|
+
logger.logToStderr(`Retrieving list of Microsoft Power Platform environments...`);
|
|
19
|
+
}
|
|
20
|
+
let url = '';
|
|
21
|
+
if (args.options.asAdmin) {
|
|
22
|
+
url = `${this.resource}/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments`;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
url = `${this.resource}/providers/Microsoft.BusinessAppPlatform/environments`;
|
|
26
|
+
}
|
|
27
|
+
const requestOptions = {
|
|
28
|
+
url: `${url}?api-version=2020-10-01`,
|
|
29
|
+
headers: {
|
|
30
|
+
accept: 'application/json'
|
|
31
|
+
},
|
|
32
|
+
responseType: 'json'
|
|
33
|
+
};
|
|
34
|
+
request_1.default
|
|
35
|
+
.get(requestOptions)
|
|
36
|
+
.then((res) => {
|
|
37
|
+
if (res.value && res.value.length > 0) {
|
|
38
|
+
res.value.forEach(e => {
|
|
39
|
+
e.displayName = e.properties.displayName;
|
|
40
|
+
});
|
|
41
|
+
logger.log(res.value);
|
|
42
|
+
}
|
|
43
|
+
cb();
|
|
44
|
+
}, (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
|
|
45
|
+
}
|
|
46
|
+
options() {
|
|
47
|
+
const options = [
|
|
48
|
+
{
|
|
49
|
+
option: '-a, --asAdmin [teamId]'
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
const parentOptions = super.options();
|
|
53
|
+
return options.concat(parentOptions);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
module.exports = new PpEnvironmentListCommand();
|
|
57
|
+
//# sourceMappingURL=environment-list.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../../../../utils");
|
|
4
|
+
const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class PpManagementAppListCommand extends PowerPlatformCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.MANAGEMENTAPP_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists management applications for Power Platform';
|
|
12
|
+
}
|
|
13
|
+
commandAction(logger, args, cb) {
|
|
14
|
+
const endpoint = `${this.resource}/providers/Microsoft.BusinessAppPlatform/adminApplications?api-version=2020-06-01`;
|
|
15
|
+
utils_1.odata
|
|
16
|
+
.getAllItems(endpoint, logger)
|
|
17
|
+
.then((managementApps) => {
|
|
18
|
+
logger.log(managementApps);
|
|
19
|
+
cb();
|
|
20
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
module.exports = new PpManagementAppListCommand();
|
|
24
|
+
//# sourceMappingURL=managementapp-list.js.map
|
package/dist/m365/pp/commands.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const prefix = 'pp';
|
|
4
4
|
exports.default = {
|
|
5
|
-
|
|
5
|
+
ENVIRONMENT_LIST: `${prefix} environment list`,
|
|
6
|
+
MANAGEMENTAPP_ADD: `${prefix} managementapp add`,
|
|
7
|
+
MANAGEMENTAPP_LIST: `${prefix} managementapp list`
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN002019_DEVDEP_spfx_fast_serve_helpers = void 0;
|
|
4
|
+
const DependencyRule_1 = require("./DependencyRule");
|
|
5
|
+
class FN002019_DEVDEP_spfx_fast_serve_helpers extends DependencyRule_1.DependencyRule {
|
|
6
|
+
constructor(packageVersion) {
|
|
7
|
+
super('spfx-fast-serve-helpers', packageVersion, true, true);
|
|
8
|
+
}
|
|
9
|
+
get id() {
|
|
10
|
+
return 'FN002019';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.FN002019_DEVDEP_spfx_fast_serve_helpers = FN002019_DEVDEP_spfx_fast_serve_helpers;
|
|
14
|
+
//# sourceMappingURL=FN002019_DEVDEP_spfx_fast_serve_helpers.js.map
|
|
@@ -34,6 +34,7 @@ const FN002014_DEVDEP_types_es6_promise_1 = require("./rules/FN002014_DEVDEP_typ
|
|
|
34
34
|
const FN002015_DEVDEP_types_react_1 = require("./rules/FN002015_DEVDEP_types_react");
|
|
35
35
|
const FN002016_DEVDEP_types_react_dom_1 = require("./rules/FN002016_DEVDEP_types_react_dom");
|
|
36
36
|
const FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7_1 = require("./rules/FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7");
|
|
37
|
+
const FN002019_DEVDEP_spfx_fast_serve_helpers_1 = require("./rules/FN002019_DEVDEP_spfx_fast_serve_helpers");
|
|
37
38
|
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
38
39
|
const FN012013_TSC_exclude_1 = require("./rules/FN012013_TSC_exclude");
|
|
39
40
|
const FN012017_TSC_extends_1 = require("./rules/FN012017_TSC_extends");
|
|
@@ -77,6 +78,7 @@ module.exports = [
|
|
|
77
78
|
new FN002014_DEVDEP_types_es6_promise_1.FN002014_DEVDEP_types_es6_promise('', false),
|
|
78
79
|
new FN002015_DEVDEP_types_react_1.FN002015_DEVDEP_types_react('16.9.36'),
|
|
79
80
|
new FN002016_DEVDEP_types_react_dom_1.FN002016_DEVDEP_types_react_dom('16.9.8'),
|
|
81
|
+
new FN002019_DEVDEP_spfx_fast_serve_helpers_1.FN002019_DEVDEP_spfx_fast_serve_helpers('1.12.0'),
|
|
80
82
|
new FN010001_YORC_version_1.FN010001_YORC_version('1.12.0'),
|
|
81
83
|
new FN012013_TSC_exclude_1.FN012013_TSC_exclude([], false),
|
|
82
84
|
new FN012017_TSC_extends_1.FN012017_TSC_extends('./node_modules/@microsoft/rush-stack-compiler-3.7/includes/tsconfig-web.json'),
|
|
@@ -29,6 +29,7 @@ const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DE
|
|
|
29
29
|
const FN002015_DEVDEP_types_react_1 = require("./rules/FN002015_DEVDEP_types_react");
|
|
30
30
|
const FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7_1 = require("./rules/FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7");
|
|
31
31
|
const FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9_1 = require("./rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9");
|
|
32
|
+
const FN002019_DEVDEP_spfx_fast_serve_helpers_1 = require("./rules/FN002019_DEVDEP_spfx_fast_serve_helpers");
|
|
32
33
|
const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
|
|
33
34
|
const FN007002_CFG_S_initialPage_1 = require("./rules/FN007002_CFG_S_initialPage");
|
|
34
35
|
const FN007003_CFG_S_api_1 = require("./rules/FN007003_CFG_S_api");
|
|
@@ -68,6 +69,7 @@ module.exports = [
|
|
|
68
69
|
new FN002015_DEVDEP_types_react_1.FN002015_DEVDEP_types_react('16.9.51'),
|
|
69
70
|
new FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7_1.FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7('', false),
|
|
70
71
|
new FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9_1.FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9('0.4.47'),
|
|
72
|
+
new FN002019_DEVDEP_spfx_fast_serve_helpers_1.FN002019_DEVDEP_spfx_fast_serve_helpers('1.13.0'),
|
|
71
73
|
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.13.0'),
|
|
72
74
|
new FN007002_CFG_S_initialPage_1.FN007002_CFG_S_initialPage('https://enter-your-SharePoint-site/_layouts/workbench.aspx'),
|
|
73
75
|
new FN007003_CFG_S_api_1.FN007003_CFG_S_api(),
|
|
@@ -22,6 +22,7 @@ const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_m
|
|
|
22
22
|
const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
|
|
23
23
|
const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
|
|
24
24
|
const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
|
|
25
|
+
const FN002019_DEVDEP_spfx_fast_serve_helpers_1 = require("./rules/FN002019_DEVDEP_spfx_fast_serve_helpers");
|
|
25
26
|
const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer");
|
|
26
27
|
const FN006005_CFG_PS_metadata_1 = require("./rules/FN006005_CFG_PS_metadata");
|
|
27
28
|
const FN006006_CFG_PS_features_1 = require("./rules/FN006006_CFG_PS_features");
|
|
@@ -50,6 +51,7 @@ module.exports = [
|
|
|
50
51
|
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.14.0'),
|
|
51
52
|
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.14.0'),
|
|
52
53
|
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.14.0'),
|
|
54
|
+
new FN002019_DEVDEP_spfx_fast_serve_helpers_1.FN002019_DEVDEP_spfx_fast_serve_helpers('1.14.0'),
|
|
53
55
|
new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.14.0'),
|
|
54
56
|
new FN006005_CFG_PS_metadata_1.FN006005_CFG_PS_metadata(),
|
|
55
57
|
new FN006006_CFG_PS_features_1.FN006006_CFG_PS_features(),
|
|
@@ -18,6 +18,7 @@ const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_m
|
|
|
18
18
|
const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
|
|
19
19
|
const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
|
|
20
20
|
const FN002003_DEVDEP_microsoft_sp_webpart_workbench_1 = require("./rules/FN002003_DEVDEP_microsoft_sp_webpart_workbench");
|
|
21
|
+
const FN002019_DEVDEP_spfx_fast_serve_helpers_1 = require("./rules/FN002019_DEVDEP_spfx_fast_serve_helpers");
|
|
21
22
|
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
22
23
|
module.exports = [
|
|
23
24
|
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.4.1'),
|
|
@@ -38,6 +39,7 @@ module.exports = [
|
|
|
38
39
|
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.4.1'),
|
|
39
40
|
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.4.1'),
|
|
40
41
|
new FN002003_DEVDEP_microsoft_sp_webpart_workbench_1.FN002003_DEVDEP_microsoft_sp_webpart_workbench('1.4.1'),
|
|
42
|
+
new FN002019_DEVDEP_spfx_fast_serve_helpers_1.FN002019_DEVDEP_spfx_fast_serve_helpers('1.4.0'),
|
|
41
43
|
new FN010001_YORC_version_1.FN010001_YORC_version('1.4.1')
|
|
42
44
|
];
|
|
43
45
|
//# sourceMappingURL=upgrade-1.4.1.js.map
|
|
@@ -29,6 +29,7 @@ const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN0020
|
|
|
29
29
|
const FN002003_DEVDEP_microsoft_sp_webpart_workbench_1 = require("./rules/FN002003_DEVDEP_microsoft_sp_webpart_workbench");
|
|
30
30
|
const FN002009_DEVDEP_microsoft_sp_tslint_rules_1 = require("./rules/FN002009_DEVDEP_microsoft_sp_tslint_rules");
|
|
31
31
|
const FN002011_DEVDEP_microsoft_rush_stack_compiler_2_9_1 = require("./rules/FN002011_DEVDEP_microsoft_rush_stack_compiler_2_9");
|
|
32
|
+
const FN002019_DEVDEP_spfx_fast_serve_helpers_1 = require("./rules/FN002019_DEVDEP_spfx_fast_serve_helpers");
|
|
32
33
|
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
33
34
|
const FN020001_RES_types_react_1 = require("./rules/FN020001_RES_types_react");
|
|
34
35
|
const FN021001_PKG_main_1 = require("./rules/FN021001_PKG_main");
|
|
@@ -62,6 +63,7 @@ module.exports = [
|
|
|
62
63
|
new FN002003_DEVDEP_microsoft_sp_webpart_workbench_1.FN002003_DEVDEP_microsoft_sp_webpart_workbench('1.9.1'),
|
|
63
64
|
new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.9.1'),
|
|
64
65
|
new FN002011_DEVDEP_microsoft_rush_stack_compiler_2_9_1.FN002011_DEVDEP_microsoft_rush_stack_compiler_2_9('0.7.16'),
|
|
66
|
+
new FN002019_DEVDEP_spfx_fast_serve_helpers_1.FN002019_DEVDEP_spfx_fast_serve_helpers('1.11.0'),
|
|
65
67
|
new FN010001_YORC_version_1.FN010001_YORC_version('1.9.1'),
|
|
66
68
|
new FN020001_RES_types_react_1.FN020001_RES_types_react('16.8.8'),
|
|
67
69
|
new FN021001_PKG_main_1.FN021001_PKG_main(true, "lib/index.js"),
|
|
@@ -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
|
}
|
|
@@ -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
|
package/dist/m365/teams/commands/channel/{channel-membership-list.js → channel-member-list.js}
RENAMED
|
@@ -4,16 +4,19 @@ const utils_1 = require("../../../../utils");
|
|
|
4
4
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
5
5
|
const commands_1 = require("../../commands");
|
|
6
6
|
const request_1 = require("../../../../request");
|
|
7
|
-
class
|
|
7
|
+
class TeamsChannelMemberListCommand extends GraphCommand_1.default {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.teamId = '';
|
|
11
11
|
}
|
|
12
12
|
get name() {
|
|
13
|
-
return commands_1.default.
|
|
13
|
+
return commands_1.default.CHANNEL_MEMBER_LIST;
|
|
14
14
|
}
|
|
15
15
|
get description() {
|
|
16
|
-
return 'Lists
|
|
16
|
+
return 'Lists members of the specified Microsoft Teams team channel';
|
|
17
|
+
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [commands_1.default.CONVERSATIONMEMBER_LIST];
|
|
17
20
|
}
|
|
18
21
|
defaultProperties() {
|
|
19
22
|
return ['id', 'roles', 'displayName', 'userId', 'email'];
|
|
@@ -28,6 +31,7 @@ class TeamsChannelMembershipListCommand extends GraphCommand_1.default {
|
|
|
28
31
|
return telemetryProps;
|
|
29
32
|
}
|
|
30
33
|
commandAction(logger, args, cb) {
|
|
34
|
+
this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_LIST, commands_1.default.CHANNEL_MEMBER_LIST);
|
|
31
35
|
this
|
|
32
36
|
.getTeamId(args)
|
|
33
37
|
.then((teamId) => {
|
|
@@ -103,13 +107,13 @@ class TeamsChannelMembershipListCommand extends GraphCommand_1.default {
|
|
|
103
107
|
options() {
|
|
104
108
|
const options = [
|
|
105
109
|
{
|
|
106
|
-
option: '--teamId [teamId]'
|
|
110
|
+
option: '-i, --teamId [teamId]'
|
|
107
111
|
},
|
|
108
112
|
{
|
|
109
113
|
option: '--teamName [teamName]'
|
|
110
114
|
},
|
|
111
115
|
{
|
|
112
|
-
option: '--channelId [channelId]'
|
|
116
|
+
option: '-c, --channelId [channelId]'
|
|
113
117
|
},
|
|
114
118
|
{
|
|
115
119
|
option: '--channelName [channelName]'
|
|
@@ -138,6 +142,9 @@ class TeamsChannelMembershipListCommand extends GraphCommand_1.default {
|
|
|
138
142
|
if (!args.options.channelId && !args.options.channelName) {
|
|
139
143
|
return 'Specify channelId or channelName, one is required';
|
|
140
144
|
}
|
|
145
|
+
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
146
|
+
return `${args.options.channelId} is not a valid Teams Channel ID`;
|
|
147
|
+
}
|
|
141
148
|
if (args.options.role) {
|
|
142
149
|
if (['owner', 'member', 'guest'].indexOf(args.options.role) === -1) {
|
|
143
150
|
return `${args.options.role} is not a valid role value. Allowed values owner|member|guest`;
|
|
@@ -146,5 +153,5 @@ class TeamsChannelMembershipListCommand extends GraphCommand_1.default {
|
|
|
146
153
|
return true;
|
|
147
154
|
}
|
|
148
155
|
}
|
|
149
|
-
module.exports = new
|
|
150
|
-
//# sourceMappingURL=channel-
|
|
156
|
+
module.exports = new TeamsChannelMemberListCommand();
|
|
157
|
+
//# sourceMappingURL=channel-member-list.js.map
|