@pnp/cli-microsoft365 5.4.0-beta.fdd7cb1 → 5.5.0-beta.3b0d087
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Auth.js +3 -3
- package/dist/Command.js +22 -0
- package/dist/m365/aad/commands/app/app-set.js +4 -1
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-remove.js +129 -0
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +60 -9
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/base/PowerAppsCommand.js +10 -0
- package/dist/m365/flow/commands/flow-export.js +3 -0
- package/dist/m365/pa/commands/app/app-get.js +3 -5
- package/dist/m365/pa/commands/app/app-list.js +10 -9
- package/dist/m365/pa/commands/app/app-remove.js +3 -3
- package/dist/m365/pa/commands/connector/connector-export.js +3 -3
- package/dist/m365/pa/commands/connector/connector-list.js +10 -9
- package/dist/m365/pa/commands/environment/environment-get.js +3 -3
- package/dist/m365/pa/commands/environment/environment-list.js +4 -4
- package/dist/m365/planner/commands/bucket/bucket-add.js +17 -9
- package/dist/m365/planner/commands/bucket/bucket-get.js +19 -11
- package/dist/m365/planner/commands/bucket/bucket-list.js +17 -9
- package/dist/m365/planner/commands/bucket/bucket-remove.js +19 -11
- package/dist/m365/planner/commands/bucket/bucket-set.js +19 -11
- package/dist/m365/planner/commands/plan/plan-add.js +98 -5
- package/dist/m365/planner/commands/plan/plan-get.js +58 -17
- package/dist/m365/planner/commands/plan/plan-remove.js +141 -0
- package/dist/m365/planner/commands/task/task-add.js +73 -24
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +53 -0
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +85 -0
- package/dist/m365/planner/commands/task/task-get.js +14 -9
- package/dist/m365/planner/commands/task/task-list.js +19 -11
- package/dist/m365/planner/commands/task/task-reference-add.js +1 -7
- package/dist/m365/planner/commands/task/task-reference-remove.js +122 -0
- package/dist/m365/planner/commands/task/task-remove.js +4 -19
- package/dist/m365/planner/commands/task/task-set.js +34 -24
- package/dist/m365/planner/commands/tenant/tenant-settings-set.js +95 -0
- package/dist/m365/planner/commands.js +6 -1
- package/dist/m365/planner/taskPriority.js +27 -0
- package/dist/m365/search/commands/externalconnection/externalconnection-get.js +69 -0
- package/dist/m365/search/commands.js +1 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.15.0.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015008_FILE_eslintrc_js.js +7 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.15.0-rc.0.js → upgrade-1.15.0.js} +34 -32
- package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- package/dist/m365/spo/base-permissions.js +9 -0
- package/dist/m365/spo/commands/customaction/customaction-get.js +32 -4
- package/dist/m365/spo/commands/customaction/customaction-remove.js +43 -8
- package/dist/m365/spo/commands/field/field-set.js +16 -9
- package/dist/m365/spo/commands/group/group-add.js +96 -0
- package/dist/m365/spo/commands/group/group-set.js +167 -0
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +99 -13
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +1 -1
- package/dist/m365/spo/commands/list/ListPrincipalType.js +13 -0
- package/dist/m365/spo/commands/list/list-get.js +6 -0
- package/dist/m365/spo/commands/list/list-list.js +10 -1
- package/dist/m365/spo/commands/listitem/listitem-get.js +9 -9
- package/dist/m365/spo/commands/listitem/listitem-list.js +5 -1
- package/dist/m365/spo/commands/listitem/listitem-set.js +2 -2
- package/dist/m365/spo/commands/roledefinition/RoleDefinition.js +3 -0
- package/dist/m365/spo/commands/roledefinition/RoleType.js +16 -0
- package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +59 -0
- package/dist/m365/spo/commands/site/site-classic-list.js +1 -0
- package/dist/m365/spo/commands/site/site-classic-set.js +1 -0
- package/dist/m365/spo/commands/site/site-list.js +59 -17
- package/dist/m365/spo/commands/site/site-set.js +322 -162
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +9 -6
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/teams/commands/cache/cache-remove.js +155 -0
- package/dist/m365/teams/commands/team/team-archive.js +51 -15
- package/dist/m365/teams/commands/team/team-remove.js +47 -11
- package/dist/m365/teams/commands/team/team-unarchive.js +48 -12
- package/dist/m365/teams/commands.js +1 -0
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +1 -9
- package/dist/utils/accessToken.js +18 -0
- package/dist/utils/planner.js +9 -8
- package/dist/utils/validation.js +5 -1
- package/docs/docs/cmd/aad/app/app-set.md +1 -1
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-remove.md +45 -0
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-restore.md +21 -3
- package/docs/docs/cmd/aad/user/user-get.md +12 -0
- package/docs/docs/cmd/planner/bucket/bucket-add.md +9 -6
- package/docs/docs/cmd/planner/bucket/bucket-get.md +10 -7
- package/docs/docs/cmd/planner/bucket/bucket-list.md +8 -5
- package/docs/docs/cmd/planner/bucket/bucket-remove.md +8 -5
- package/docs/docs/cmd/planner/bucket/bucket-set.md +9 -6
- package/docs/docs/cmd/planner/plan/plan-add.md +18 -2
- package/docs/docs/cmd/planner/plan/plan-get.md +14 -2
- package/docs/docs/cmd/planner/plan/plan-remove.md +48 -0
- package/docs/docs/cmd/planner/task/task-add.md +51 -12
- package/docs/docs/cmd/planner/task/task-checklistitem-list.md +24 -0
- package/docs/docs/cmd/planner/task/task-checklistitem-remove.md +36 -0
- package/docs/docs/cmd/planner/task/task-get.md +17 -8
- package/docs/docs/cmd/planner/task/task-list.md +9 -6
- package/docs/docs/cmd/planner/task/task-reference-remove.md +39 -0
- package/docs/docs/cmd/planner/task/task-set.md +20 -7
- package/docs/docs/cmd/planner/tenant/tenant-settings-set.md +56 -0
- package/docs/docs/cmd/search/externalconnection/externalconnection-get.md +33 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-get.md +15 -2
- package/docs/docs/cmd/spo/customaction/customaction-remove.md +33 -2
- package/docs/docs/cmd/spo/field/field-set.md +7 -4
- package/docs/docs/cmd/spo/group/group-add.md +51 -0
- package/docs/docs/cmd/spo/group/group-set.md +69 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-get.md +39 -7
- package/docs/docs/cmd/spo/hubsite/hubsite-list.md +1 -4
- package/docs/docs/cmd/spo/list/list-list.md +3 -0
- package/docs/docs/cmd/spo/listitem/listitem-get.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-list.md +8 -0
- package/docs/docs/cmd/spo/roledefinition/roledefinition-get.md +27 -0
- package/docs/docs/cmd/spo/site/site-classic-list.md +3 -0
- package/docs/docs/cmd/spo/site/site-classic-set.md +3 -0
- package/docs/docs/cmd/spo/site/site-list.md +19 -7
- package/docs/docs/cmd/spo/site/site-set.md +50 -6
- package/docs/docs/cmd/teams/cache/cache-remove.md +46 -0
- package/docs/docs/cmd/teams/team/team-archive.md +20 -5
- package/docs/docs/cmd/teams/team/team-remove.md +19 -5
- package/docs/docs/cmd/teams/team/team-unarchive.md +18 -4
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.md +1 -1
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.md +1 -1
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.md +1 -1
- package/npm-shrinkwrap.json +175 -160
- package/package.json +13 -13
- package/dist/m365/planner/commands/plan/plan-details-get.js +0 -116
- package/docs/docs/cmd/planner/plan/plan-details-get.md +0 -45
|
@@ -0,0 +1,122 @@
|
|
|
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 PlannerTaskReferenceRemoveCommand extends GraphCommand_1.default {
|
|
9
|
+
get name() {
|
|
10
|
+
return commands_1.default.TASK_REFERENCE_REMOVE;
|
|
11
|
+
}
|
|
12
|
+
get description() {
|
|
13
|
+
return 'Removes the reference from the Planner task';
|
|
14
|
+
}
|
|
15
|
+
getTelemetryProperties(args) {
|
|
16
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
17
|
+
telemetryProps.url = typeof args.options.url !== 'undefined';
|
|
18
|
+
telemetryProps.alias = typeof args.options.alias !== 'undefined';
|
|
19
|
+
telemetryProps.confirm = (!(!args.options.confirm)).toString();
|
|
20
|
+
return telemetryProps;
|
|
21
|
+
}
|
|
22
|
+
commandAction(logger, args, cb) {
|
|
23
|
+
if (args.options.confirm) {
|
|
24
|
+
this.removeReference(logger, args, cb);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
cli_1.Cli.prompt({
|
|
28
|
+
type: 'confirm',
|
|
29
|
+
name: 'continue',
|
|
30
|
+
default: false,
|
|
31
|
+
message: `Are you sure you want to remove the reference from the Planner task?`
|
|
32
|
+
}, (result) => {
|
|
33
|
+
if (!result.continue) {
|
|
34
|
+
cb();
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.removeReference(logger, args, cb);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
removeReference(logger, args, cb) {
|
|
43
|
+
this
|
|
44
|
+
.getTaskDetailsEtagAndUrl(args.options)
|
|
45
|
+
.then(({ etag, url }) => {
|
|
46
|
+
const requestOptionsTaskDetails = {
|
|
47
|
+
url: `${this.resource}/v1.0/planner/tasks/${args.options.taskId}/details`,
|
|
48
|
+
headers: {
|
|
49
|
+
'accept': 'application/json;odata.metadata=none',
|
|
50
|
+
'If-Match': etag,
|
|
51
|
+
'Prefer': 'return=representation'
|
|
52
|
+
},
|
|
53
|
+
responseType: 'json',
|
|
54
|
+
data: {
|
|
55
|
+
references: {
|
|
56
|
+
[utils_1.formatting.openTypesEncoder(url)]: null
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return request_1.default.patch(requestOptionsTaskDetails);
|
|
61
|
+
})
|
|
62
|
+
.then(() => {
|
|
63
|
+
cb();
|
|
64
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
65
|
+
}
|
|
66
|
+
getTaskDetailsEtagAndUrl(options) {
|
|
67
|
+
const requestOptions = {
|
|
68
|
+
url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(options.taskId)}/details`,
|
|
69
|
+
headers: {
|
|
70
|
+
accept: 'application/json'
|
|
71
|
+
},
|
|
72
|
+
responseType: 'json'
|
|
73
|
+
};
|
|
74
|
+
let url = options.url;
|
|
75
|
+
return request_1.default
|
|
76
|
+
.get(requestOptions)
|
|
77
|
+
.then((taskDetails) => {
|
|
78
|
+
if (options.alias) {
|
|
79
|
+
const urls = [];
|
|
80
|
+
if (taskDetails.references) {
|
|
81
|
+
Object.entries(taskDetails.references).forEach((ref) => {
|
|
82
|
+
var _a;
|
|
83
|
+
if (((_a = ref[1].alias) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === options.alias.toLocaleLowerCase()) {
|
|
84
|
+
urls.push(decodeURIComponent(ref[0]));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
if (urls.length === 0) {
|
|
89
|
+
return Promise.reject(`The specified reference with alias ${options.alias} does not exist`);
|
|
90
|
+
}
|
|
91
|
+
if (urls.length > 1) {
|
|
92
|
+
return Promise.reject(`Multiple references with alias ${options.alias} found. Pass one of the following urls within the "--url" option : ${urls}`);
|
|
93
|
+
}
|
|
94
|
+
url = urls[0];
|
|
95
|
+
}
|
|
96
|
+
return Promise.resolve({ etag: taskDetails['@odata.etag'], url });
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
options() {
|
|
100
|
+
const options = [
|
|
101
|
+
{ option: '-u, --url [url]' },
|
|
102
|
+
{ option: '--alias [alias]' },
|
|
103
|
+
{ option: '-i, --taskId <taskId>' },
|
|
104
|
+
{ option: '--confirm' }
|
|
105
|
+
];
|
|
106
|
+
const parentOptions = super.options();
|
|
107
|
+
return options.concat(parentOptions);
|
|
108
|
+
}
|
|
109
|
+
optionSets() {
|
|
110
|
+
return [
|
|
111
|
+
['url', 'alias']
|
|
112
|
+
];
|
|
113
|
+
}
|
|
114
|
+
validate(args) {
|
|
115
|
+
if (args.options.url && args.options.url.indexOf('https://') !== 0 && args.options.url.indexOf('http://') !== 0) {
|
|
116
|
+
return 'The url option should contain a valid URL. A valid URL starts with http(s)://';
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
module.exports = new PlannerTaskReferenceRemoveCommand();
|
|
122
|
+
//# sourceMappingURL=task-reference-remove.js.map
|
|
@@ -114,7 +114,7 @@ class PlannerTaskRemoveCommand extends GraphCommand_1.default {
|
|
|
114
114
|
}
|
|
115
115
|
return this
|
|
116
116
|
.getGroupId(options)
|
|
117
|
-
.then(groupId => planner_1.planner.
|
|
117
|
+
.then(groupId => planner_1.planner.getPlanByTitle(planTitle, groupId))
|
|
118
118
|
.then(plan => plan.id);
|
|
119
119
|
}
|
|
120
120
|
getGroupId(options) {
|
|
@@ -122,24 +122,9 @@ class PlannerTaskRemoveCommand extends GraphCommand_1.default {
|
|
|
122
122
|
if (ownerGroupId) {
|
|
123
123
|
return Promise.resolve(ownerGroupId);
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
accept: 'application/json;odata.metadata=none'
|
|
129
|
-
},
|
|
130
|
-
responseType: 'json'
|
|
131
|
-
};
|
|
132
|
-
return request_1.default
|
|
133
|
-
.get(requestOptions)
|
|
134
|
-
.then(response => {
|
|
135
|
-
if (response.value.length === 0) {
|
|
136
|
-
return Promise.reject(`The specified owner group ${ownerGroupName} does not exist`);
|
|
137
|
-
}
|
|
138
|
-
if (response.value.length > 1) {
|
|
139
|
-
return Promise.reject(`Multiple owner groups with name ${ownerGroupName} found: ${response.value.map(x => x.id)}`);
|
|
140
|
-
}
|
|
141
|
-
return Promise.resolve(response.value[0].id);
|
|
142
|
-
});
|
|
125
|
+
return utils_1.aadGroup
|
|
126
|
+
.getGroupByDisplayName(ownerGroupName)
|
|
127
|
+
.then(group => group.id);
|
|
143
128
|
}
|
|
144
129
|
options() {
|
|
145
130
|
const options = [
|
|
@@ -7,6 +7,7 @@ const planner_1 = require("../../../../utils/planner");
|
|
|
7
7
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
8
8
|
const commands_1 = require("../../commands");
|
|
9
9
|
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
10
|
+
const taskPriority_1 = require("../../taskPriority");
|
|
10
11
|
class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
@@ -23,6 +24,7 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
23
24
|
telemetryProps.title = typeof args.options.title !== 'undefined';
|
|
24
25
|
telemetryProps.planId = typeof args.options.planId !== 'undefined';
|
|
25
26
|
telemetryProps.planName = typeof args.options.planName !== 'undefined';
|
|
27
|
+
telemetryProps.planTitle = typeof args.options.planTitle !== 'undefined';
|
|
26
28
|
telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
|
|
27
29
|
telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
|
|
28
30
|
telemetryProps.bucketId = typeof args.options.bucketId !== 'undefined';
|
|
@@ -36,9 +38,14 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
36
38
|
telemetryProps.description = typeof args.options.description !== 'undefined';
|
|
37
39
|
telemetryProps.appliedCategories = typeof args.options.appliedCategories !== 'undefined';
|
|
38
40
|
telemetryProps.orderHint = typeof args.options.orderHint !== 'undefined';
|
|
41
|
+
telemetryProps.priority = typeof args.options.priority !== 'undefined';
|
|
39
42
|
return telemetryProps;
|
|
40
43
|
}
|
|
41
44
|
commandAction(logger, args, cb) {
|
|
45
|
+
if (args.options.planName) {
|
|
46
|
+
args.options.planTitle = args.options.planName;
|
|
47
|
+
this.warn(logger, `Option 'planName' is deprecated. Please use 'planTitle' instead`);
|
|
48
|
+
}
|
|
42
49
|
if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
|
|
43
50
|
this.handleError('This command does not support application permissions.', logger, cb);
|
|
44
51
|
return;
|
|
@@ -110,13 +117,7 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
110
117
|
};
|
|
111
118
|
return request_1.default
|
|
112
119
|
.get(requestOptions)
|
|
113
|
-
.then((response) =>
|
|
114
|
-
const etag = response ? response['@odata.etag'] : undefined;
|
|
115
|
-
if (!etag) {
|
|
116
|
-
return Promise.reject(`Error fetching task details`);
|
|
117
|
-
}
|
|
118
|
-
return Promise.resolve(etag);
|
|
119
|
-
});
|
|
120
|
+
.then((response) => response['@odata.etag']);
|
|
120
121
|
}
|
|
121
122
|
getTaskEtag(taskId) {
|
|
122
123
|
const requestOptions = {
|
|
@@ -128,13 +129,7 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
128
129
|
};
|
|
129
130
|
return request_1.default
|
|
130
131
|
.get(requestOptions)
|
|
131
|
-
.then((response) =>
|
|
132
|
-
const etag = response ? response['@odata.etag'] : undefined;
|
|
133
|
-
if (!etag) {
|
|
134
|
-
return Promise.reject(`Error fetching task`);
|
|
135
|
-
}
|
|
136
|
-
return Promise.resolve(etag);
|
|
137
|
-
});
|
|
132
|
+
.then((response) => response['@odata.etag']);
|
|
138
133
|
}
|
|
139
134
|
generateAppliedCategories(options) {
|
|
140
135
|
if (!options.appliedCategories) {
|
|
@@ -224,7 +219,7 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
224
219
|
}
|
|
225
220
|
return this
|
|
226
221
|
.getGroupId(options)
|
|
227
|
-
.then((groupId) => planner_1.planner.
|
|
222
|
+
.then((groupId) => planner_1.planner.getPlanByTitle(options.planTitle, groupId))
|
|
228
223
|
.then(plan => plan.id);
|
|
229
224
|
}
|
|
230
225
|
getGroupId(options) {
|
|
@@ -264,6 +259,9 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
264
259
|
if (options.orderHint) {
|
|
265
260
|
requestBody.orderHint = options.orderHint;
|
|
266
261
|
}
|
|
262
|
+
if (options.priority !== undefined) {
|
|
263
|
+
requestBody.priority = taskPriority_1.taskPriority.getPriorityValue(options.priority);
|
|
264
|
+
}
|
|
267
265
|
return requestBody;
|
|
268
266
|
}
|
|
269
267
|
options() {
|
|
@@ -272,6 +270,7 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
272
270
|
{ option: '-t, --title [title]' },
|
|
273
271
|
{ option: '--planId [planId]' },
|
|
274
272
|
{ option: '--planName [planName]' },
|
|
273
|
+
{ option: '--planTitle [planTitle]' },
|
|
275
274
|
{ option: '--ownerGroupId [ownerGroupId]' },
|
|
276
275
|
{ option: '--ownerGroupName [ownerGroupName]' },
|
|
277
276
|
{ option: '--bucketId [bucketId]' },
|
|
@@ -284,7 +283,8 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
284
283
|
{ option: '--assigneePriority [assigneePriority]' },
|
|
285
284
|
{ option: '--description [description]' },
|
|
286
285
|
{ option: '--appliedCategories [appliedCategories]' },
|
|
287
|
-
{ option: '--orderHint [orderHint]' }
|
|
286
|
+
{ option: '--orderHint [orderHint]' },
|
|
287
|
+
{ option: '--priority [priority]', autocomplete: taskPriority_1.taskPriority.priorityValues }
|
|
288
288
|
];
|
|
289
289
|
const parentOptions = super.options();
|
|
290
290
|
return options.concat(parentOptions);
|
|
@@ -293,17 +293,17 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
293
293
|
if (args.options.bucketId && args.options.bucketName) {
|
|
294
294
|
return 'Specify either bucketId or bucketName but not both';
|
|
295
295
|
}
|
|
296
|
-
if (args.options.bucketName && !args.options.planId && !args.options.planName) {
|
|
297
|
-
return 'Specify either planId or
|
|
296
|
+
if (args.options.bucketName && !args.options.planId && !args.options.planName && !args.options.planTitle) {
|
|
297
|
+
return 'Specify either planId or planTitle when using bucketName';
|
|
298
298
|
}
|
|
299
|
-
if (args.options.bucketName && args.options.planId && args.options.planName) {
|
|
300
|
-
return 'Specify either planId or
|
|
299
|
+
if (args.options.bucketName && args.options.planId && (args.options.planName || args.options.planTitle)) {
|
|
300
|
+
return 'Specify either planId or planTitle when using bucketName but not both';
|
|
301
301
|
}
|
|
302
|
-
if (args.options.planName && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
303
|
-
return 'Specify either ownerGroupId or ownerGroupName when using
|
|
302
|
+
if ((args.options.planName || args.options.planTitle) && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
303
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
304
304
|
}
|
|
305
|
-
if (args.options.planName && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
306
|
-
return 'Specify either ownerGroupId or ownerGroupName when using
|
|
305
|
+
if ((args.options.planName || args.options.planTitle) && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
306
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
307
307
|
}
|
|
308
308
|
if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
309
309
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
@@ -329,6 +329,16 @@ class PlannerTaskSetCommand extends GraphCommand_1.default {
|
|
|
329
329
|
if (args.options.appliedCategories && args.options.appliedCategories.split(',').filter(category => this.allowedAppliedCategories.indexOf(category.toLocaleLowerCase()) < 0).length !== 0) {
|
|
330
330
|
return 'The appliedCategories contains invalid value. Specify either category1, category2, category3, category4, category5 and/or category6 as properties';
|
|
331
331
|
}
|
|
332
|
+
if (args.options.priority !== undefined) {
|
|
333
|
+
if (typeof args.options.priority === "number") {
|
|
334
|
+
if (isNaN(args.options.priority) || args.options.priority < 0 || args.options.priority > 10 || !Number.isInteger(args.options.priority)) {
|
|
335
|
+
return 'priority should be an integer between 0 and 10.';
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
else if (taskPriority_1.taskPriority.priorityValues.map(l => l.toLowerCase()).indexOf(args.options.priority.toString().toLowerCase()) === -1) {
|
|
339
|
+
return `${args.options.priority} is not a valid priority value. Allowed values are ${taskPriority_1.taskPriority.priorityValues.join('|')}.`;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
332
342
|
return true;
|
|
333
343
|
}
|
|
334
344
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../../../../utils");
|
|
4
|
+
const request_1 = require("../../../../request");
|
|
5
|
+
const PlannerCommand_1 = require("../../../base/PlannerCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class PlannerTenantSettingsSetCommand extends PlannerCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.TENANT_SETTINGS_SET;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Sets Microsoft Planner configuration of the tenant';
|
|
13
|
+
}
|
|
14
|
+
getTelemetryProperties(args) {
|
|
15
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
16
|
+
telemetryProps.isPlannerAllowed = typeof args.options.isPlannerAllowed !== 'undefined';
|
|
17
|
+
telemetryProps.allowCalendarSharing = typeof args.options.allowCalendarSharing !== 'undefined';
|
|
18
|
+
telemetryProps.allowTenantMoveWithDataLoss = typeof args.options.allowTenantMoveWithDataLoss !== 'undefined';
|
|
19
|
+
telemetryProps.allowTenantMoveWithDataMigration = typeof args.options.allowTenantMoveWithDataMigration !== 'undefined';
|
|
20
|
+
telemetryProps.allowRosterCreation = typeof args.options.allowRosterCreation !== 'undefined';
|
|
21
|
+
telemetryProps.allowPlannerMobilePushNotifications = typeof args.options.allowPlannerMobilePushNotifications !== 'undefined';
|
|
22
|
+
return telemetryProps;
|
|
23
|
+
}
|
|
24
|
+
commandAction(logger, args, cb) {
|
|
25
|
+
const requestOptions = {
|
|
26
|
+
url: `${this.resource}/taskAPI/tenantAdminSettings/Settings`,
|
|
27
|
+
headers: {
|
|
28
|
+
accept: 'application/json;odata.metadata=none',
|
|
29
|
+
prefer: 'return=representation'
|
|
30
|
+
},
|
|
31
|
+
responseType: 'json',
|
|
32
|
+
data: {
|
|
33
|
+
isPlannerAllowed: args.options.isPlannerAllowed,
|
|
34
|
+
allowCalendarSharing: args.options.allowCalendarSharing,
|
|
35
|
+
allowTenantMoveWithDataLoss: args.options.allowTenantMoveWithDataLoss,
|
|
36
|
+
allowTenantMoveWithDataMigration: args.options.allowTenantMoveWithDataMigration,
|
|
37
|
+
allowRosterCreation: args.options.allowRosterCreation,
|
|
38
|
+
allowPlannerMobilePushNotifications: args.options.allowPlannerMobilePushNotifications
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
request_1.default
|
|
42
|
+
.patch(requestOptions)
|
|
43
|
+
.then((result) => {
|
|
44
|
+
logger.log(result);
|
|
45
|
+
cb();
|
|
46
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
47
|
+
}
|
|
48
|
+
options() {
|
|
49
|
+
const options = [
|
|
50
|
+
{
|
|
51
|
+
option: '--isPlannerAllowed [isPlannerAllowed]',
|
|
52
|
+
autocomplete: ['true', 'false']
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
option: '--allowCalendarSharing [allowCalendarSharing]',
|
|
56
|
+
autocomplete: ['true', 'false']
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
option: '--allowTenantMoveWithDataLoss [allowTenantMoveWithDataLoss]',
|
|
60
|
+
autocomplete: ['true', 'false']
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
option: '--allowTenantMoveWithDataMigration [allowTenantMoveWithDataMigration]',
|
|
64
|
+
autocomplete: ['true', 'false']
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
option: '--allowRosterCreation [allowRosterCreation]',
|
|
68
|
+
autocomplete: ['true', 'false']
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
option: '--allowPlannerMobilePushNotifications [allowPlannerMobilePushNotifications]',
|
|
72
|
+
autocomplete: ['true', 'false']
|
|
73
|
+
}
|
|
74
|
+
];
|
|
75
|
+
const parentOptions = super.options();
|
|
76
|
+
return options.concat(parentOptions);
|
|
77
|
+
}
|
|
78
|
+
validate(args) {
|
|
79
|
+
const optionsArray = [
|
|
80
|
+
args.options.isPlannerAllowed, args.options.allowCalendarSharing, args.options.allowTenantMoveWithDataLoss,
|
|
81
|
+
args.options.allowTenantMoveWithDataMigration, args.options.allowRosterCreation, args.options.allowPlannerMobilePushNotifications
|
|
82
|
+
];
|
|
83
|
+
if (optionsArray.every(o => typeof o === 'undefined')) {
|
|
84
|
+
return 'You must specify at least one option';
|
|
85
|
+
}
|
|
86
|
+
for (const option of optionsArray) {
|
|
87
|
+
if (typeof option !== 'undefined' && !utils_1.validation.isValidBoolean(option)) {
|
|
88
|
+
return `Value '${option}' is not a valid boolean`;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
module.exports = new PlannerTenantSettingsSetCommand();
|
|
95
|
+
//# sourceMappingURL=tenant-settings-set.js.map
|
|
@@ -11,15 +11,20 @@ exports.default = {
|
|
|
11
11
|
PLAN_DETAILS_GET: `${prefix} plan details get`,
|
|
12
12
|
PLAN_GET: `${prefix} plan get`,
|
|
13
13
|
PLAN_LIST: `${prefix} plan list`,
|
|
14
|
+
PLAN_REMOVE: `${prefix} plan remove`,
|
|
14
15
|
TASK_ADD: `${prefix} task add`,
|
|
15
16
|
TASK_CHECKLISTITEM_ADD: `${prefix} task checklistitem add`,
|
|
17
|
+
TASK_CHECKLISTITEM_LIST: `${prefix} task checklistitem list`,
|
|
18
|
+
TASK_CHECKLISTITEM_REMOVE: `${prefix} task checklistitem remove`,
|
|
16
19
|
TASK_DETAILS_GET: `${prefix} task details get`,
|
|
17
20
|
TASK_GET: `${prefix} task get`,
|
|
18
21
|
TASK_LIST: `${prefix} task list`,
|
|
19
22
|
TASK_REFERENCE_ADD: `${prefix} task reference add`,
|
|
20
23
|
TASK_REFERENCE_LIST: `${prefix} task reference list`,
|
|
24
|
+
TASK_REFERENCE_REMOVE: `${prefix} task reference remove`,
|
|
21
25
|
TASK_REMOVE: `${prefix} task remove`,
|
|
22
26
|
TASK_SET: `${prefix} task set`,
|
|
23
|
-
TENANT_SETTINGS_LIST: `${prefix} tenant settings list
|
|
27
|
+
TENANT_SETTINGS_LIST: `${prefix} tenant settings list`,
|
|
28
|
+
TENANT_SETTINGS_SET: `${prefix} tenant settings set`
|
|
24
29
|
};
|
|
25
30
|
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.taskPriority = void 0;
|
|
4
|
+
exports.taskPriority = {
|
|
5
|
+
/** Priority labels used in Planner. */
|
|
6
|
+
priorityValues: ["Urgent", "Important", "Medium", "Low"],
|
|
7
|
+
/**
|
|
8
|
+
* Transform priority label to the corresponding number value.
|
|
9
|
+
* @param priority Priority label or number.
|
|
10
|
+
*/
|
|
11
|
+
getPriorityValue(priority) {
|
|
12
|
+
if (typeof priority === "string") {
|
|
13
|
+
switch (priority.toLowerCase()) {
|
|
14
|
+
case "urgent":
|
|
15
|
+
return 1;
|
|
16
|
+
case "important":
|
|
17
|
+
return 3;
|
|
18
|
+
case "medium":
|
|
19
|
+
return 5;
|
|
20
|
+
case "low":
|
|
21
|
+
return 9;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return priority;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=taskPriority.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class SearchExternalConnectionGetCommand extends GraphCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.EXTERNALCONNECTION_GET;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Get a specific external connection for use in Microsoft Search';
|
|
12
|
+
}
|
|
13
|
+
getTelemetryProperties(args) {
|
|
14
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
15
|
+
telemetryProps.id = typeof args.options.id !== 'undefined';
|
|
16
|
+
telemetryProps.name = typeof args.options.name !== 'undefined';
|
|
17
|
+
return telemetryProps;
|
|
18
|
+
}
|
|
19
|
+
commandAction(logger, args, cb) {
|
|
20
|
+
let url = `${this.resource}/v1.0/external/connections`;
|
|
21
|
+
if (args.options.id) {
|
|
22
|
+
url += `/${encodeURIComponent(args.options.id)}`;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
url += `?$filter=name eq '${encodeURIComponent(args.options.name)}'`;
|
|
26
|
+
}
|
|
27
|
+
const requestOptions = {
|
|
28
|
+
url: url,
|
|
29
|
+
headers: {
|
|
30
|
+
accept: 'application/json;odata.metadata=none'
|
|
31
|
+
},
|
|
32
|
+
responseType: 'json'
|
|
33
|
+
};
|
|
34
|
+
request_1.default
|
|
35
|
+
.get(requestOptions)
|
|
36
|
+
.then((res) => {
|
|
37
|
+
if (args.options.name) {
|
|
38
|
+
if (res.value.length === 0) {
|
|
39
|
+
return Promise.reject(`External connection with name '${args.options.name}' not found`);
|
|
40
|
+
}
|
|
41
|
+
res = res.value[0];
|
|
42
|
+
}
|
|
43
|
+
return Promise.resolve(res);
|
|
44
|
+
})
|
|
45
|
+
.then(res => {
|
|
46
|
+
logger.log(res);
|
|
47
|
+
cb();
|
|
48
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
49
|
+
}
|
|
50
|
+
optionSets() {
|
|
51
|
+
return [
|
|
52
|
+
['id', 'name']
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
options() {
|
|
56
|
+
const options = [
|
|
57
|
+
{
|
|
58
|
+
option: '-i, --id [id]'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
option: '-n, --name [name]'
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
const parentOptions = super.options();
|
|
65
|
+
return options.concat(parentOptions);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
module.exports = new SearchExternalConnectionGetCommand();
|
|
69
|
+
//# sourceMappingURL=externalconnection-get.js.map
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const prefix = 'search';
|
|
4
4
|
exports.default = {
|
|
5
5
|
EXTERNALCONNECTION_ADD: `${prefix} externalconnection add`,
|
|
6
|
+
EXTERNALCONNECTION_GET: `${prefix} externalconnection get`,
|
|
6
7
|
EXTERNALCONNECTION_LIST: `${prefix} externalconnection list`
|
|
7
8
|
};
|
|
8
9
|
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const FN001008_DEP_react_1 = require("./rules/FN001008_DEP_react");
|
|
4
|
+
const FN001009_DEP_react_dom_1 = require("./rules/FN001009_DEP_react_dom");
|
|
5
|
+
const FN001022_DEP_office_ui_fabric_react_1 = require("./rules/FN001022_DEP_office_ui_fabric_react");
|
|
6
|
+
const FN002004_DEVDEP_gulp_1 = require("./rules/FN002004_DEVDEP_gulp");
|
|
7
|
+
const FN002007_DEVDEP_ajv_1 = require("./rules/FN002007_DEVDEP_ajv");
|
|
8
|
+
const FN002013_DEVDEP_types_webpack_env_1 = require("./rules/FN002013_DEVDEP_types_webpack_env");
|
|
9
|
+
const FN002015_DEVDEP_types_react_1 = require("./rules/FN002015_DEVDEP_types_react");
|
|
10
|
+
const FN002016_DEVDEP_types_react_dom_1 = require("./rules/FN002016_DEVDEP_types_react_dom");
|
|
11
|
+
const FN002019_DEVDEP_microsoft_rush_stack_compiler_1 = require("./rules/FN002019_DEVDEP_microsoft_rush_stack_compiler");
|
|
12
|
+
module.exports = [
|
|
13
|
+
new FN001008_DEP_react_1.FN001008_DEP_react('16'),
|
|
14
|
+
new FN001009_DEP_react_dom_1.FN001009_DEP_react_dom('16'),
|
|
15
|
+
new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.185.7'),
|
|
16
|
+
new FN002004_DEVDEP_gulp_1.FN002004_DEVDEP_gulp('4.0.2'),
|
|
17
|
+
new FN002007_DEVDEP_ajv_1.FN002007_DEVDEP_ajv('^6.12.5'),
|
|
18
|
+
new FN002013_DEVDEP_types_webpack_env_1.FN002013_DEVDEP_types_webpack_env('~1.15.2'),
|
|
19
|
+
new FN002015_DEVDEP_types_react_1.FN002015_DEVDEP_types_react('16'),
|
|
20
|
+
new FN002016_DEVDEP_types_react_dom_1.FN002016_DEVDEP_types_react_dom('16'),
|
|
21
|
+
new FN002019_DEVDEP_microsoft_rush_stack_compiler_1.FN002019_DEVDEP_microsoft_rush_stack_compiler(['4.5'])
|
|
22
|
+
];
|
|
23
|
+
//# sourceMappingURL=doctor-1.15.0.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FN015008_FILE_eslintrc_js = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../utils");
|
|
4
5
|
const FileAddRemoveRule_1 = require("./FileAddRemoveRule");
|
|
5
6
|
class FN015008_FILE_eslintrc_js extends FileAddRemoveRule_1.FileAddRemoveRule {
|
|
6
7
|
constructor(add, contents) {
|
|
@@ -9,6 +10,12 @@ class FN015008_FILE_eslintrc_js extends FileAddRemoveRule_1.FileAddRemoveRule {
|
|
|
9
10
|
get id() {
|
|
10
11
|
return 'FN015008';
|
|
11
12
|
}
|
|
13
|
+
visit(project, notifications) {
|
|
14
|
+
if (utils_1.spfx.isReactProject(project)) {
|
|
15
|
+
this.contents = this.contents.replace('@microsoft/eslint-config-spfx/lib/profiles/default', '@microsoft/eslint-config-spfx/lib/profiles/react');
|
|
16
|
+
}
|
|
17
|
+
super.visit(project, notifications);
|
|
18
|
+
}
|
|
12
19
|
}
|
|
13
20
|
exports.FN015008_FILE_eslintrc_js = FN015008_FILE_eslintrc_js;
|
|
14
21
|
//# sourceMappingURL=FN015008_FILE_eslintrc_js.js.map
|