@pnp/cli-microsoft365 5.2.0-beta.87aa892 → 5.2.0-beta.a7f6b06

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.
@@ -0,0 +1,208 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_1 = require("../../../../request");
4
+ const utils_1 = require("../../../../utils");
5
+ const GraphCommand_1 = require("../../../base/GraphCommand");
6
+ const commands_1 = require("../../commands");
7
+ class PlannerBucketSetCommand extends GraphCommand_1.default {
8
+ get name() {
9
+ return commands_1.default.BUCKET_SET;
10
+ }
11
+ get description() {
12
+ return 'Updates a Microsoft Planner bucket';
13
+ }
14
+ getTelemetryProperties(args) {
15
+ const telemetryProps = super.getTelemetryProperties(args);
16
+ telemetryProps.id = typeof args.options.id !== 'undefined';
17
+ telemetryProps.name = typeof args.options.name !== 'undefined';
18
+ telemetryProps.planId = typeof args.options.planId !== 'undefined';
19
+ telemetryProps.planName = typeof args.options.planName !== 'undefined';
20
+ telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
21
+ telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
22
+ telemetryProps.newName = typeof args.options.newName !== 'undefined';
23
+ telemetryProps.orderHint = typeof args.options.orderHint !== 'undefined';
24
+ return telemetryProps;
25
+ }
26
+ commandAction(logger, args, cb) {
27
+ this
28
+ .getBucket(args)
29
+ .then(bucket => {
30
+ const requestOptions = {
31
+ url: `${this.resource}/v1.0/planner/buckets/${bucket.id}`,
32
+ headers: {
33
+ accept: 'application/json;odata.metadata=none',
34
+ 'if-match': bucket['@odata.etag']
35
+ },
36
+ responseType: 'json',
37
+ data: {}
38
+ };
39
+ const { newName, orderHint } = args.options;
40
+ if (newName) {
41
+ requestOptions.data.name = newName;
42
+ }
43
+ if (orderHint) {
44
+ requestOptions.data.orderHint = orderHint;
45
+ }
46
+ return request_1.default.patch(requestOptions);
47
+ })
48
+ .then(_ => cb(), (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
49
+ }
50
+ getBucket(args) {
51
+ if (args.options.id) {
52
+ const requestOptions = {
53
+ url: `${this.resource}/v1.0/planner/buckets/${args.options.id}`,
54
+ headers: {
55
+ accept: 'application/json'
56
+ },
57
+ responseType: 'json'
58
+ };
59
+ return request_1.default.get(requestOptions);
60
+ }
61
+ return this
62
+ .getPlanId(args)
63
+ .then(planId => {
64
+ const requestOptions = {
65
+ url: `${this.resource}/v1.0/planner/plans/${planId}/buckets`,
66
+ headers: {
67
+ accept: 'application/json'
68
+ },
69
+ responseType: 'json'
70
+ };
71
+ return request_1.default.get(requestOptions);
72
+ })
73
+ .then(buckets => {
74
+ const filteredBuckets = buckets.value.filter(b => args.options.name.toLowerCase() === b.name.toLowerCase());
75
+ if (!filteredBuckets.length) {
76
+ return Promise.reject(`The specified bucket ${args.options.name} does not exist`);
77
+ }
78
+ if (filteredBuckets.length > 1) {
79
+ return Promise.reject(`Multiple buckets with name ${args.options.name} found: ${filteredBuckets.map(x => x.id)}`);
80
+ }
81
+ return Promise.resolve(filteredBuckets[0]);
82
+ });
83
+ }
84
+ getPlanId(args) {
85
+ const { planId, planName } = args.options;
86
+ if (planId) {
87
+ return Promise.resolve(planId);
88
+ }
89
+ return this
90
+ .getGroupId(args)
91
+ .then(groupId => {
92
+ const requestOptions = {
93
+ url: `${this.resource}/v1.0/planner/plans?$filter=owner eq '${groupId}'`,
94
+ headers: {
95
+ accept: 'application/json;odata.metadata=none'
96
+ },
97
+ responseType: 'json'
98
+ };
99
+ return request_1.default.get(requestOptions);
100
+ })
101
+ .then(plans => {
102
+ const filteredPlans = plans.value.filter(p => p.title.toLowerCase() === planName.toLowerCase());
103
+ if (filteredPlans.length === 0) {
104
+ return Promise.reject(`The specified plan ${planName} does not exist`);
105
+ }
106
+ if (filteredPlans.length > 1) {
107
+ return Promise.reject(`Multiple plans with name ${planName} found: ${filteredPlans.map(x => x.id)}`);
108
+ }
109
+ return Promise.resolve(filteredPlans[0].id);
110
+ });
111
+ }
112
+ getGroupId(args) {
113
+ const { ownerGroupId, ownerGroupName } = args.options;
114
+ if (ownerGroupId) {
115
+ return Promise.resolve(ownerGroupId);
116
+ }
117
+ const requestOptions = {
118
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(ownerGroupName)}'`,
119
+ headers: {
120
+ accept: 'application/json;odata.metadata=none'
121
+ },
122
+ responseType: 'json'
123
+ };
124
+ return request_1.default
125
+ .get(requestOptions)
126
+ .then(response => {
127
+ if (response.value.length === 0) {
128
+ return Promise.reject(`The specified owner group ${ownerGroupName} does not exist`);
129
+ }
130
+ if (response.value.length > 1) {
131
+ return Promise.reject(`Multiple owner groups with name ${ownerGroupName} found: ${response.value.map(x => x.id)}`);
132
+ }
133
+ return Promise.resolve(response.value[0].id);
134
+ });
135
+ }
136
+ options() {
137
+ const options = [
138
+ {
139
+ option: '-i, --id [id]'
140
+ },
141
+ {
142
+ option: '--name [name]'
143
+ },
144
+ {
145
+ option: '--planId [planId]'
146
+ },
147
+ {
148
+ option: '--planName [planName]'
149
+ },
150
+ {
151
+ option: '--ownerGroupId [ownerGroupId]'
152
+ },
153
+ {
154
+ option: '--ownerGroupName [ownerGroupName]'
155
+ },
156
+ {
157
+ option: '--newName [newName]'
158
+ },
159
+ {
160
+ option: '--orderHint [orderHint]'
161
+ }
162
+ ];
163
+ const parentOptions = super.options();
164
+ return options.concat(parentOptions);
165
+ }
166
+ optionSets() {
167
+ return [
168
+ ['id', 'name']
169
+ ];
170
+ }
171
+ validate(args) {
172
+ if (args.options.id) {
173
+ if (args.options.planId || args.options.planName || args.options.ownerGroupId || args.options.ownerGroupName) {
174
+ return 'Don\'t specify planId, planName, ownerGroupId or ownerGroupName when using id';
175
+ }
176
+ }
177
+ if (args.options.name) {
178
+ if (!args.options.planId && !args.options.planName) {
179
+ return 'Specify either planId or planName when using name';
180
+ }
181
+ if (args.options.planId && args.options.planName) {
182
+ return 'Specify either planId or planName when using name but not both';
183
+ }
184
+ if (args.options.planName) {
185
+ if (!args.options.ownerGroupId && !args.options.ownerGroupName) {
186
+ return 'Specify either ownerGroupId or ownerGroupName when using planName';
187
+ }
188
+ if (args.options.ownerGroupId && args.options.ownerGroupName) {
189
+ return 'Specify either ownerGroupId or ownerGroupName when using planName but not both';
190
+ }
191
+ if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
192
+ return `${args.options.ownerGroupId} is not a valid GUID`;
193
+ }
194
+ }
195
+ if (args.options.planId) {
196
+ if (args.options.ownerGroupId || args.options.ownerGroupName) {
197
+ return 'Don\'t specify ownerGroupId or ownerGroupName when using planId';
198
+ }
199
+ }
200
+ }
201
+ if (!args.options.newName && !args.options.orderHint) {
202
+ return 'Specify either newName or orderHint';
203
+ }
204
+ return true;
205
+ }
206
+ }
207
+ module.exports = new PlannerBucketSetCommand();
208
+ //# sourceMappingURL=bucket-set.js.map
@@ -4,6 +4,7 @@ const prefix = 'planner';
4
4
  exports.default = {
5
5
  BUCKET_ADD: `${prefix} bucket add`,
6
6
  BUCKET_LIST: `${prefix} bucket list`,
7
+ BUCKET_SET: `${prefix} bucket set`,
7
8
  PLAN_ADD: `${prefix} plan add`,
8
9
  PLAN_GET: `${prefix} plan get`,
9
10
  PLAN_DETAILS_GET: `${prefix} plan details get`,
@@ -30,34 +30,34 @@ const FN006004_CFG_PS_developer_1 = require("./rules/FN006004_CFG_PS_developer")
30
30
  const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
31
31
  const FN023002_GITIGNORE_heft_1 = require("./rules/FN023002_GITIGNORE_heft");
32
32
  module.exports = [
33
- new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.15.0-beta.1'),
34
- new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.15.0-beta.1'),
35
- new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.15.0-beta.1'),
36
- new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.15.0-beta.1'),
37
- new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.15.0-beta.1'),
38
- new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.15.0-beta.1'),
39
- new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.15.0-beta.1'),
40
- new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.15.0-beta.1'),
41
- new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.15.0-beta.1'),
42
- new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.181.1'),
43
- new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.15.0-beta.1'),
44
- new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.15.0-beta.1'),
45
- new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.15.0-beta.1'),
46
- new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.15.0-beta.1'),
47
- new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.15.0-beta.1'),
48
- new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.15.0-beta.1'),
49
- new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.15.0-beta.1'),
50
- new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.15.0-beta.1'),
51
- new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.15.0-beta.1'),
52
- new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.15.0-beta.1'),
53
- new FN001033_DEP_tslib_1.FN001033_DEP_tslib('1.13.0'),
54
- new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.15.0-beta.1'),
55
- new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.15.0-beta.1'),
33
+ new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.15.0-beta.6'),
34
+ new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.15.0-beta.6'),
35
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.15.0-beta.6'),
36
+ new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.15.0-beta.6'),
37
+ new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.15.0-beta.6'),
38
+ new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.15.0-beta.6'),
39
+ new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.15.0-beta.6'),
40
+ new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.15.0-beta.6'),
41
+ new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.15.0-beta.6'),
42
+ new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.183.1'),
43
+ new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.15.0-beta.6'),
44
+ new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.15.0-beta.6'),
45
+ new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.15.0-beta.6'),
46
+ new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.15.0-beta.6'),
47
+ new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.15.0-beta.6'),
48
+ new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.15.0-beta.6'),
49
+ new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.15.0-beta.6'),
50
+ new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.15.0-beta.6'),
51
+ new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.15.0-beta.6'),
52
+ new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.15.0-beta.6'),
53
+ new FN001033_DEP_tslib_1.FN001033_DEP_tslib('2.3.1'),
54
+ new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.15.0-beta.6'),
55
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.15.0-beta.6'),
56
56
  new FN002007_DEVDEP_ajv_1.FN002007_DEVDEP_ajv('6.12.5'),
57
- new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.15.0-beta.1'),
57
+ new FN002009_DEVDEP_microsoft_sp_tslint_rules_1.FN002009_DEVDEP_microsoft_sp_tslint_rules('1.15.0-beta.6'),
58
58
  new FN002013_DEVDEP_types_webpack_env_1.FN002013_DEVDEP_types_webpack_env('1.15.2'),
59
- new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.15.0-beta.1'),
60
- new FN010001_YORC_version_1.FN010001_YORC_version('1.15.0-beta.1'),
59
+ new FN006004_CFG_PS_developer_1.FN006004_CFG_PS_developer('1.15.0-beta.6'),
60
+ new FN010001_YORC_version_1.FN010001_YORC_version('1.15.0-beta.6'),
61
61
  new FN023002_GITIGNORE_heft_1.FN023002_GITIGNORE_heft()
62
62
  ];
63
- //# sourceMappingURL=upgrade-1.15.0-beta.1.js.map
63
+ //# sourceMappingURL=upgrade-1.15.0-beta.6.js.map
@@ -47,7 +47,7 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
47
47
  '1.13.0',
48
48
  '1.13.1',
49
49
  '1.14.0',
50
- '1.15.0-beta.1'
50
+ '1.15.0-beta.6'
51
51
  ];
52
52
  }
53
53
  get name() {
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cli_1 = require("../../../../cli");
4
+ const request_1 = require("../../../../request");
5
+ const utils_1 = require("../../../../utils");
6
+ const GraphCommand_1 = require("../../../base/GraphCommand");
7
+ const commands_1 = require("../../commands");
8
+ class TeamsChannelMemberRemoveCommand extends GraphCommand_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.teamId = '';
12
+ this.channelId = '';
13
+ }
14
+ get name() {
15
+ return commands_1.default.CHANNEL_MEMBER_REMOVE;
16
+ }
17
+ get description() {
18
+ return 'Updates the role of the specified member in the specified Microsoft Teams private team channel';
19
+ }
20
+ alias() {
21
+ return [commands_1.default.CONVERSATIONMEMBER_REMOVE];
22
+ }
23
+ optionSets() {
24
+ return [
25
+ ['teamId', 'teamName'],
26
+ ['channelId', 'channelName'],
27
+ ['userId', 'userName', 'id']
28
+ ];
29
+ }
30
+ getTelemetryProperties(args) {
31
+ const telemetryProps = super.getTelemetryProperties(args);
32
+ telemetryProps.teamId = typeof args.options.teamId !== 'undefined';
33
+ telemetryProps.teamName = typeof args.options.teamName !== 'undefined';
34
+ telemetryProps.channelId = typeof args.options.channelId !== 'undefined';
35
+ telemetryProps.channelName = typeof args.options.channelName !== 'undefined';
36
+ telemetryProps.userName = typeof args.options.userName !== 'undefined';
37
+ telemetryProps.userId = typeof args.options.userId !== 'undefined';
38
+ telemetryProps.id = typeof args.options.id !== 'undefined';
39
+ telemetryProps.confirm = (!(!args.options.confirm)).toString();
40
+ return telemetryProps;
41
+ }
42
+ commandAction(logger, args, cb) {
43
+ this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_REMOVE, commands_1.default.CHANNEL_MEMBER_REMOVE);
44
+ const removeMember = () => {
45
+ this
46
+ .removeMemberFromChannel(args)
47
+ .then(cb, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
48
+ };
49
+ if (args.options.confirm) {
50
+ removeMember();
51
+ }
52
+ else {
53
+ const userName = args.options.userName || args.options.userId || args.options.id;
54
+ const teamName = args.options.teamName || args.options.teamId;
55
+ const channelName = args.options.channelName || args.options.channelId;
56
+ cli_1.Cli.prompt({
57
+ type: 'confirm',
58
+ name: 'continue',
59
+ default: false,
60
+ message: `Are you sure you want to remove the member ${userName} from the channel ${channelName} in team ${teamName}?`
61
+ }, (result) => {
62
+ if (!result.continue) {
63
+ cb();
64
+ }
65
+ else {
66
+ removeMember();
67
+ }
68
+ });
69
+ }
70
+ }
71
+ removeMemberFromChannel(args) {
72
+ return this
73
+ .getTeamId(args)
74
+ .then((teamId) => {
75
+ this.teamId = teamId;
76
+ return this.getChannelId(args);
77
+ })
78
+ .then((channelId) => {
79
+ this.channelId = channelId;
80
+ return this.getMemberId(args);
81
+ })
82
+ .then((memberId) => {
83
+ const requestOptions = {
84
+ url: `${this.resource}/v1.0/teams/${this.teamId}/channels/${this.channelId}/members/${memberId}`,
85
+ headers: {
86
+ 'accept': 'application/json;odata.metadata=none'
87
+ },
88
+ responseType: 'json'
89
+ };
90
+ return request_1.default.delete(requestOptions);
91
+ });
92
+ }
93
+ getTeamId(args) {
94
+ if (args.options.teamId) {
95
+ return Promise.resolve(args.options.teamId);
96
+ }
97
+ const requestOptions = {
98
+ url: `${this.resource}/v1.0/groups?$filter=displayName eq '${encodeURIComponent(args.options.teamName)}'`,
99
+ headers: {
100
+ accept: 'application/json;odata.metadata=none'
101
+ },
102
+ responseType: 'json'
103
+ };
104
+ return request_1.default
105
+ .get(requestOptions)
106
+ .then(response => {
107
+ const groupItem = response.value[0];
108
+ if (!groupItem) {
109
+ return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
110
+ }
111
+ if (groupItem.resourceProvisioningOptions.indexOf('Team') === -1) {
112
+ return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
113
+ }
114
+ if (response.value.length > 1) {
115
+ return Promise.reject(`Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${response.value.map(x => x.id)}`);
116
+ }
117
+ return Promise.resolve(groupItem.id);
118
+ });
119
+ }
120
+ getChannelId(args) {
121
+ if (args.options.channelId) {
122
+ return Promise.resolve(args.options.channelId);
123
+ }
124
+ const requestOptions = {
125
+ url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.channelName)}'`,
126
+ headers: {
127
+ accept: 'application/json;odata.metadata=none'
128
+ },
129
+ responseType: 'json'
130
+ };
131
+ return request_1.default
132
+ .get(requestOptions)
133
+ .then(response => {
134
+ const channelItem = response.value[0];
135
+ if (!channelItem) {
136
+ return Promise.reject(`The specified channel does not exist in the Microsoft Teams team`);
137
+ }
138
+ return Promise.resolve(channelItem.id);
139
+ });
140
+ }
141
+ getMemberId(args) {
142
+ if (args.options.id) {
143
+ return Promise.resolve(args.options.id);
144
+ }
145
+ const requestOptions = {
146
+ url: `${this.resource}/v1.0/teams/${this.teamId}/channels/${this.channelId}/members`,
147
+ headers: {
148
+ accept: 'application/json;odata.metadata=none'
149
+ },
150
+ responseType: 'json'
151
+ };
152
+ return request_1.default
153
+ .get(requestOptions)
154
+ .then(response => {
155
+ const conversationMembers = response.value.filter(x => {
156
+ var _a, _b;
157
+ return args.options.userId && ((_a = x.userId) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === args.options.userId.toLocaleLowerCase() ||
158
+ args.options.userName && ((_b = x.email) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase()) === args.options.userName.toLocaleLowerCase();
159
+ });
160
+ const conversationMember = conversationMembers[0];
161
+ if (!conversationMember) {
162
+ return Promise.reject(`The specified member does not exist in the Microsoft Teams channel`);
163
+ }
164
+ if (conversationMembers.length > 1) {
165
+ return Promise.reject(`Multiple Microsoft Teams channel members with name ${args.options.userName} found: ${response.value.map(x => x.userId)}`);
166
+ }
167
+ return Promise.resolve(conversationMember.id);
168
+ });
169
+ }
170
+ options() {
171
+ const options = [
172
+ {
173
+ option: '--teamId [teamId]'
174
+ },
175
+ {
176
+ option: '--teamName [teamName]'
177
+ },
178
+ {
179
+ option: '--channelId [channelId]'
180
+ },
181
+ {
182
+ option: '--channelName [channelName]'
183
+ },
184
+ {
185
+ option: '--userName [userName]'
186
+ },
187
+ {
188
+ option: '--userId [userId]'
189
+ },
190
+ {
191
+ option: '--id [id]'
192
+ },
193
+ {
194
+ option: '--confirm'
195
+ }
196
+ ];
197
+ const parentOptions = super.options();
198
+ return options.concat(parentOptions);
199
+ }
200
+ validate(args) {
201
+ if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
202
+ return `${args.options.teamId} is not a valid GUID`;
203
+ }
204
+ if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
205
+ return `${args.options.channelId} is not a valid Teams Channel ID`;
206
+ }
207
+ if (args.options.userId && !utils_1.validation.isValidGuid(args.options.userId)) {
208
+ return `${args.options.userId} is not a valid GUID`;
209
+ }
210
+ return true;
211
+ }
212
+ }
213
+ module.exports = new TeamsChannelMemberRemoveCommand();
214
+ //# sourceMappingURL=channel-member-remove.js.map
@@ -13,6 +13,7 @@ exports.default = {
13
13
  CHANNEL_LIST: `${prefix} channel list`,
14
14
  CHANNEL_MEMBER_ADD: `${prefix} channel member add`,
15
15
  CHANNEL_MEMBER_LIST: `${prefix} channel member list`,
16
+ CHANNEL_MEMBER_REMOVE: `${prefix} channel member remove`,
16
17
  CHANNEL_MEMBER_SET: `${prefix} channel member set`,
17
18
  CHANNEL_REMOVE: `${prefix} channel remove`,
18
19
  CHANNEL_SET: `${prefix} channel set`,
@@ -23,6 +24,7 @@ exports.default = {
23
24
  CHAT_MESSAGE_SEND: `${prefix} chat message send`,
24
25
  CONVERSATIONMEMBER_ADD: `${prefix} conversationmember add`,
25
26
  CONVERSATIONMEMBER_LIST: `${prefix} conversationmember list`,
27
+ CONVERSATIONMEMBER_REMOVE: `${prefix} conversationmember remove`,
26
28
  FUNSETTINGS_LIST: `${prefix} funsettings list`,
27
29
  FUNSETTINGS_SET: `${prefix} funsettings set`,
28
30
  GUESTSETTINGS_LIST: `${prefix} guestsettings list`,
@@ -0,0 +1,57 @@
1
+ # planner bucket set
2
+
3
+ Updates a Microsoft Planner bucket
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 planner bucket set [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id [id]`
14
+ : ID of the bucket. Specify either `id` or `name` but not both.
15
+
16
+ `--name [name]`
17
+ : Name of the bucket. Specify either `id` or `name` but not both.
18
+
19
+ `--planId [planId]`
20
+ : ID of the plan to update the bucket of. Use when referring to bucket using `name`. Specify either `planId` or `planName` but not both.
21
+
22
+ `--planName [planName]`
23
+ : Name of the plan to update the bucket of. Use when referring to bucket using `name`. Specify either `planId` or `planName` but not both.
24
+
25
+ `--ownerGroupId [ownerGroupId]`
26
+ : ID of the group to which the plan belongs. Use when referring to plan using `planName`. Specify `ownerGroupId` or `ownerGroupName`.
27
+
28
+ `--ownerGroupName [ownerGroupName]`
29
+ : Name of the group to which the plan belongs. Use when referring to plan using `planName`. Specify `ownerGroupId` or `ownerGroupName`.
30
+
31
+ `--newName [newName]`
32
+ : New name of the bucket.
33
+
34
+ `--orderHint [orderHint]`
35
+ : Hint used to order items of this type in a list view. The format is defined as outlined [here](https://docs.microsoft.com/en-us/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0).
36
+
37
+ --8<-- "docs/cmd/_global.md"
38
+
39
+ ## Examples
40
+
41
+ Updates the Microsoft Planner bucket with ID _vncYUXCRBke28qMLB-d4xJcACtNz_
42
+
43
+ ```sh
44
+ m365 planner bucket set --id "vncYUXCRBke28qMLB-d4xJcACtNz" --newName "New bucket name"
45
+ ```
46
+
47
+ Updates the Microsoft Planner bucket named _My Bucket_ in the Plan _My Plan_ owned by group _My Group_
48
+
49
+ ```sh
50
+ m365 planner bucket set --name "My Bucket" --planName "My Plan" --ownerGroupName "My Group" --newName "New bucket name"
51
+ ```
52
+
53
+ Updates the Microsoft Planner bucket named _My Bucket_ in the Plan _My Plan_ owned by group with ID _00000000-0000-0000-0000-000000000000_
54
+
55
+ ```sh
56
+ m365 planner bucket set --name "My Bucket" --planName "My Plan" --ownerGroupId 00000000-0000-0000-0000-000000000000 --newName "New bucket name"
57
+ ```
@@ -23,10 +23,10 @@ m365 planner task set [options]
23
23
  : Name of the bucket to move the task to. The bucket needs to exist in the selected plan. Specify either `bucketId` or `bucketName` but not both.
24
24
 
25
25
  `--planId [planId]`
26
- : ID of the plan to move the task to. Specify either `planId` or `planName` but not both.
26
+ : ID of the plan to which the bucket belongs to. Specify either `planId` or `planName` when using `bucketName`.
27
27
 
28
28
  `--planName [planName]`
29
- : Name of the plan to move the task to. Specify either `planId` or `planName` but not both.
29
+ : Name of the plan to which the bucket belongs to. Specify either `planId` or `planName` when using `bucketName`.
30
30
 
31
31
  `--ownerGroupId [ownerGroupId]`
32
32
  : ID of the group to which the plan belongs. Specify `ownerGroupId` or `ownerGroupName` when using `planName`.
@@ -32,7 +32,7 @@ m365 spfx project upgrade [options]
32
32
 
33
33
  ## Remarks
34
34
 
35
- The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.14.0). If you specify the `preview` option without a specific version, the command will upgrade your project to the latest preview version v1.15.0-beta.1.
35
+ The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.14.0). If you specify the `preview` option without a specific version, the command will upgrade your project to the latest preview version v1.15.0-beta.6.
36
36
 
37
37
  This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
38
38
 
@@ -0,0 +1,57 @@
1
+ # teams channel member remove
2
+
3
+ Remove the specified member from the specified Microsoft Teams private team channel
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 teams channel member remove [options]
9
+ ```
10
+
11
+ ## Alias
12
+
13
+ ```sh
14
+ m365 teams conversationmember remove [options]
15
+ ```
16
+
17
+ ## Options
18
+
19
+ `--teamId [teamId]`
20
+ : The Id of the Microsoft Teams team. Specify either `teamId` or `teamName` but not both
21
+
22
+ `--teamName [teamName]`
23
+ : The display name of the Microsoft Teams team. Specify either `teamId` or `teamName` but not both
24
+
25
+ `--channelId [channelId]`
26
+ : The Id of the Microsoft Teams team channel. Specify either `channelId` or `channelName` but not both
27
+
28
+ `--channelName [channelName]`
29
+ : The display name of the Microsoft Teams team channel. Specify either `channelId` or `channelName` but not both
30
+
31
+ `--userName [userName]`
32
+ : User's UPN (user principal name, e.g. johndoe@example.com). Specify either userName, userId or id but not multiple.
33
+
34
+ `--userId [userId]`
35
+ : User's Azure AD Id. Specify either userName, userId or id but not multiple.
36
+
37
+ `--id [id]`
38
+ : Channel member Id of a user. Specify either userName, userId or id but not multiple.
39
+
40
+ `--confirm`
41
+ : Don't prompt for confirmation
42
+
43
+ --8<-- "docs/cmd/_global.md"
44
+
45
+ ## Examples
46
+
47
+ Remove the user _johndoe@example.com_ from the Microsoft Teams team with id 00000000-0000-0000-0000-000000000000 and channel id 00:00000000000000000000000000000000@thread.skype
48
+
49
+ ```sh
50
+ m365 teams channel member remove --teamId 00000000-0000-0000-0000-000000000000 --channelId 00:00000000000000000000000000000000@thread.skype --userName "johndoe@example.com"
51
+ ```
52
+
53
+ Remove the user with id 00000000-0000-0000-0000-000000000000 from the Microsoft Teams team with name _Team Name_ and channel with name _Channel Name_
54
+
55
+ ```sh
56
+ m365 teams channel member remove --teamName "Team Name" --channelName "Channel Name" --userId 00000000-0000-0000-0000-000000000000
57
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.2.0-beta.87aa892",
3
+ "version": "5.2.0-beta.a7f6b06",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",