@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,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const Auth_1 = require("../../../../Auth");
|
|
13
|
+
const cli_1 = require("../../../../cli");
|
|
14
|
+
const request_1 = require("../../../../request");
|
|
15
|
+
const utils_1 = require("../../../../utils");
|
|
16
|
+
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
17
|
+
const planner_1 = require("../../../../utils/planner");
|
|
18
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
19
|
+
const commands_1 = require("../../commands");
|
|
20
|
+
class PlannerPlanRemoveCommand extends GraphCommand_1.default {
|
|
21
|
+
get name() {
|
|
22
|
+
return commands_1.default.PLAN_REMOVE;
|
|
23
|
+
}
|
|
24
|
+
get description() {
|
|
25
|
+
return 'Removes the Microsoft Planner plan';
|
|
26
|
+
}
|
|
27
|
+
getTelemetryProperties(args) {
|
|
28
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
29
|
+
telemetryProps.id = typeof args.options.id !== 'undefined';
|
|
30
|
+
telemetryProps.title = typeof args.options.title !== 'undefined';
|
|
31
|
+
telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
|
|
32
|
+
telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
|
|
33
|
+
telemetryProps.confirm = !!args.options.confirm;
|
|
34
|
+
return telemetryProps;
|
|
35
|
+
}
|
|
36
|
+
commandAction(logger, args, cb) {
|
|
37
|
+
if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
|
|
38
|
+
this.handleError('This command does not support application permissions.', logger, cb);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const removePlan = () => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
try {
|
|
43
|
+
const plan = yield this.getPlan(args);
|
|
44
|
+
const requestOptions = {
|
|
45
|
+
url: `${this.resource}/v1.0/planner/plans/${plan.id}`,
|
|
46
|
+
headers: {
|
|
47
|
+
accept: 'application/json;odata.metadata=none',
|
|
48
|
+
'if-match': plan['@odata.etag']
|
|
49
|
+
},
|
|
50
|
+
responseType: 'json'
|
|
51
|
+
};
|
|
52
|
+
yield request_1.default.delete(requestOptions);
|
|
53
|
+
cb();
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
this.handleRejectedODataJsonPromise(err, logger, cb);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
if (args.options.confirm) {
|
|
60
|
+
removePlan();
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
cli_1.Cli.prompt({
|
|
64
|
+
type: 'confirm',
|
|
65
|
+
name: 'continue',
|
|
66
|
+
default: false,
|
|
67
|
+
message: `Are you sure you want to remove the plan ${args.options.id || args.options.title}?`
|
|
68
|
+
}, (result) => {
|
|
69
|
+
if (!result.continue) {
|
|
70
|
+
cb();
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
removePlan();
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
getPlan(args) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const { id, title } = args.options;
|
|
81
|
+
if (id) {
|
|
82
|
+
return planner_1.planner.getPlanById(id, 'minimal');
|
|
83
|
+
}
|
|
84
|
+
const groupId = yield this.getGroupId(args);
|
|
85
|
+
return yield planner_1.planner.getPlanByTitle(title, groupId);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
getGroupId(args) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const { ownerGroupId, ownerGroupName } = args.options;
|
|
91
|
+
if (ownerGroupId) {
|
|
92
|
+
return ownerGroupId;
|
|
93
|
+
}
|
|
94
|
+
const group = yield aadGroup_1.aadGroup.getGroupByDisplayName(ownerGroupName);
|
|
95
|
+
return group.id;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
optionSets() {
|
|
99
|
+
return [['id', 'title']];
|
|
100
|
+
}
|
|
101
|
+
options() {
|
|
102
|
+
const options = [
|
|
103
|
+
{
|
|
104
|
+
option: '-i, --id [id]'
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
option: '-t, --title [title]'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
option: '--ownerGroupId [ownerGroupId]'
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
option: '--ownerGroupName [ownerGroupName]'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
option: '--confirm'
|
|
117
|
+
}
|
|
118
|
+
];
|
|
119
|
+
const parentOptions = super.options();
|
|
120
|
+
return options.concat(parentOptions);
|
|
121
|
+
}
|
|
122
|
+
validate(args) {
|
|
123
|
+
if (args.options.title) {
|
|
124
|
+
if (!args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
125
|
+
return 'Specify either ownerGroupId or ownerGroupName';
|
|
126
|
+
}
|
|
127
|
+
if (args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
128
|
+
return 'Specify either ownerGroupId or ownerGroupName but not both';
|
|
129
|
+
}
|
|
130
|
+
if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
131
|
+
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else if (args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
135
|
+
return 'Don\'t specify ownerGroupId or ownerGroupName when using id';
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
module.exports = new PlannerPlanRemoveCommand();
|
|
141
|
+
//# sourceMappingURL=plan-remove.js.map
|
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const Auth_1 = require("../../../../Auth");
|
|
4
4
|
const request_1 = require("../../../../request");
|
|
5
|
-
const planner_1 = require("../../../../utils/planner");
|
|
6
5
|
const utils_1 = require("../../../../utils");
|
|
6
|
+
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
7
|
+
const planner_1 = require("../../../../utils/planner");
|
|
7
8
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
8
9
|
const commands_1 = require("../../commands");
|
|
9
|
-
const
|
|
10
|
+
const taskPriority_1 = require("../../taskPriority");
|
|
10
11
|
class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.allowedAppliedCategories = ['category1', 'category2', 'category3', 'category4', 'category5', 'category6'];
|
|
15
|
+
this.allowedPreviewTypes = ['automatic', 'nopreview', 'checklist', 'description', 'reference'];
|
|
16
|
+
}
|
|
11
17
|
get name() {
|
|
12
18
|
return commands_1.default.TASK_ADD;
|
|
13
19
|
}
|
|
@@ -18,6 +24,7 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
18
24
|
const telemetryProps = super.getTelemetryProperties(args);
|
|
19
25
|
telemetryProps.planId = typeof args.options.planId !== 'undefined';
|
|
20
26
|
telemetryProps.planName = typeof args.options.planName !== 'undefined';
|
|
27
|
+
telemetryProps.planTitle = typeof args.options.planTitle !== 'undefined';
|
|
21
28
|
telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
|
|
22
29
|
telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
|
|
23
30
|
telemetryProps.bucketId = typeof args.options.bucketId !== 'undefined';
|
|
@@ -27,11 +34,19 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
27
34
|
telemetryProps.percentComplete = typeof args.options.percentComplete !== 'undefined';
|
|
28
35
|
telemetryProps.assignedToUserIds = typeof args.options.assignedToUserIds !== 'undefined';
|
|
29
36
|
telemetryProps.assignedToUserNames = typeof args.options.assignedToUserNames !== 'undefined';
|
|
37
|
+
telemetryProps.assigneePriority = typeof args.options.assigneePriority !== 'undefined';
|
|
30
38
|
telemetryProps.description = typeof args.options.description !== 'undefined';
|
|
39
|
+
telemetryProps.appliedCategories = typeof args.options.appliedCategories !== 'undefined';
|
|
40
|
+
telemetryProps.previewType = typeof args.options.previewType !== 'undefined';
|
|
31
41
|
telemetryProps.orderHint = typeof args.options.orderHint !== 'undefined';
|
|
42
|
+
telemetryProps.priority = typeof args.options.priority !== 'undefined';
|
|
32
43
|
return telemetryProps;
|
|
33
44
|
}
|
|
34
45
|
commandAction(logger, args, cb) {
|
|
46
|
+
if (args.options.planName) {
|
|
47
|
+
args.options.planTitle = args.options.planName;
|
|
48
|
+
this.warn(logger, `Option 'planName' is deprecated. Please use 'planTitle' instead`);
|
|
49
|
+
}
|
|
35
50
|
if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
|
|
36
51
|
this.handleError('This command does not support application permissions.', logger, cb);
|
|
37
52
|
return;
|
|
@@ -47,10 +62,11 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
47
62
|
return this.generateUserAssignments(args);
|
|
48
63
|
})
|
|
49
64
|
.then(assignments => {
|
|
65
|
+
const appliedCategories = this.generateAppliedCategories(args.options);
|
|
50
66
|
const requestOptions = {
|
|
51
67
|
url: `${this.resource}/v1.0/planner/tasks`,
|
|
52
68
|
headers: {
|
|
53
|
-
|
|
69
|
+
accept: 'application/json;odata.metadata=none'
|
|
54
70
|
},
|
|
55
71
|
responseType: 'json',
|
|
56
72
|
data: {
|
|
@@ -61,7 +77,10 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
61
77
|
dueDateTime: args.options.dueDateTime,
|
|
62
78
|
percentComplete: args.options.percentComplete,
|
|
63
79
|
assignments: assignments,
|
|
64
|
-
orderHint: args.options.orderHint
|
|
80
|
+
orderHint: args.options.orderHint,
|
|
81
|
+
assigneePriority: args.options.assigneePriority,
|
|
82
|
+
appliedCategories: appliedCategories,
|
|
83
|
+
priority: taskPriority_1.taskPriority.getPriorityValue(args.options.priority)
|
|
65
84
|
}
|
|
66
85
|
};
|
|
67
86
|
return request_1.default.post(requestOptions);
|
|
@@ -82,17 +101,19 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
82
101
|
};
|
|
83
102
|
return request_1.default
|
|
84
103
|
.get(requestOptions)
|
|
85
|
-
.then((response) =>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
}
|
|
104
|
+
.then((response) => response['@odata.etag']);
|
|
105
|
+
}
|
|
106
|
+
generateAppliedCategories(options) {
|
|
107
|
+
if (!options.appliedCategories) {
|
|
108
|
+
return {};
|
|
109
|
+
}
|
|
110
|
+
const categories = {};
|
|
111
|
+
options.appliedCategories.toLocaleLowerCase().split(',').forEach(x => categories[x] = true);
|
|
112
|
+
return categories;
|
|
92
113
|
}
|
|
93
114
|
updateTaskDetails(options, newTask) {
|
|
94
115
|
const taskId = newTask.id;
|
|
95
|
-
if (!options.description) {
|
|
116
|
+
if (!options.description && !options.previewType) {
|
|
96
117
|
return Promise.resolve(newTask);
|
|
97
118
|
}
|
|
98
119
|
return this
|
|
@@ -107,7 +128,8 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
107
128
|
},
|
|
108
129
|
responseType: 'json',
|
|
109
130
|
data: {
|
|
110
|
-
description: options.description
|
|
131
|
+
description: options.description,
|
|
132
|
+
previewType: options.previewType
|
|
111
133
|
}
|
|
112
134
|
};
|
|
113
135
|
return request_1.default.patch(requestOptionsTaskDetails);
|
|
@@ -158,7 +180,7 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
158
180
|
}
|
|
159
181
|
return this
|
|
160
182
|
.getGroupId(args)
|
|
161
|
-
.then((groupId) => planner_1.planner.
|
|
183
|
+
.then((groupId) => planner_1.planner.getPlanByTitle(args.options.planTitle, groupId))
|
|
162
184
|
.then(plan => plan.id);
|
|
163
185
|
}
|
|
164
186
|
getGroupId(args) {
|
|
@@ -206,6 +228,7 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
206
228
|
{ option: '-t, --title <title>' },
|
|
207
229
|
{ option: '--planId [planId]' },
|
|
208
230
|
{ option: '--planName [planName]' },
|
|
231
|
+
{ option: '--planTitle [planTitle]' },
|
|
209
232
|
{ option: '--ownerGroupId [ownerGroupId]' },
|
|
210
233
|
{ option: '--ownerGroupName [ownerGroupName]' },
|
|
211
234
|
{ option: '--bucketId [bucketId]' },
|
|
@@ -215,24 +238,34 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
215
238
|
{ option: '--percentComplete [percentComplete]' },
|
|
216
239
|
{ option: '--assignedToUserIds [assignedToUserIds]' },
|
|
217
240
|
{ option: '--assignedToUserNames [assignedToUserNames]' },
|
|
241
|
+
{ option: '--assigneePriority [assigneePriority]' },
|
|
218
242
|
{ option: '--description [description]' },
|
|
219
|
-
{
|
|
243
|
+
{
|
|
244
|
+
option: '--appliedCategories [appliedCategories]',
|
|
245
|
+
autocomplete: this.allowedAppliedCategories
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
option: '--previewType [previewType]',
|
|
249
|
+
autocomplete: this.allowedPreviewTypes
|
|
250
|
+
},
|
|
251
|
+
{ option: '--orderHint [orderHint]' },
|
|
252
|
+
{ option: '--priority [priority]', autocomplete: taskPriority_1.taskPriority.priorityValues }
|
|
220
253
|
];
|
|
221
254
|
const parentOptions = super.options();
|
|
222
255
|
return options.concat(parentOptions);
|
|
223
256
|
}
|
|
224
257
|
validate(args) {
|
|
225
|
-
if (!args.options.planId && !args.options.planName) {
|
|
226
|
-
return 'Specify either planId or
|
|
258
|
+
if (!args.options.planId && !args.options.planName && !args.options.planTitle) {
|
|
259
|
+
return 'Specify either planId or planTitle';
|
|
227
260
|
}
|
|
228
|
-
if (args.options.planId && args.options.planName) {
|
|
229
|
-
return 'Specify either planId or
|
|
261
|
+
if (args.options.planId && (args.options.planName || args.options.planTitle)) {
|
|
262
|
+
return 'Specify either planId or planTitle but not both';
|
|
230
263
|
}
|
|
231
|
-
if (args.options.planName && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
232
|
-
return 'Specify either ownerGroupId or ownerGroupName when using
|
|
264
|
+
if ((args.options.planName || args.options.planTitle) && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
265
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
233
266
|
}
|
|
234
|
-
if (args.options.planName && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
235
|
-
return 'Specify either ownerGroupId or ownerGroupName when using
|
|
267
|
+
if ((args.options.planName || args.options.planTitle) && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
268
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
236
269
|
}
|
|
237
270
|
if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
238
271
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
@@ -253,7 +286,7 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
253
286
|
return `percentComplete is not a number`;
|
|
254
287
|
}
|
|
255
288
|
if (args.options.percentComplete && (args.options.percentComplete < 0 || args.options.percentComplete > 100)) {
|
|
256
|
-
return `percentComplete should be between 0 and 100
|
|
289
|
+
return `percentComplete should be between 0 and 100`;
|
|
257
290
|
}
|
|
258
291
|
if (args.options.assignedToUserIds && !utils_1.validation.isValidGuidArray(args.options.assignedToUserIds.split(','))) {
|
|
259
292
|
return 'assignedToUserIds contains invalid GUID';
|
|
@@ -261,6 +294,22 @@ class PlannerTaskAddCommand extends GraphCommand_1.default {
|
|
|
261
294
|
if (args.options.assignedToUserIds && args.options.assignedToUserNames) {
|
|
262
295
|
return 'Specify either assignedToUserIds or assignedToUserNames but not both';
|
|
263
296
|
}
|
|
297
|
+
if (args.options.appliedCategories && args.options.appliedCategories.split(',').filter(category => this.allowedAppliedCategories.indexOf(category.toLocaleLowerCase()) < 0).length !== 0) {
|
|
298
|
+
return `The appliedCategories contains invalid value. Specify either ${this.allowedAppliedCategories.join(', ')} as properties`;
|
|
299
|
+
}
|
|
300
|
+
if (args.options.previewType && this.allowedPreviewTypes.indexOf(args.options.previewType.toLocaleLowerCase()) === -1) {
|
|
301
|
+
return `${args.options.previewType} is not a valid preview type value. Allowed values are ${this.allowedPreviewTypes.join(', ')}`;
|
|
302
|
+
}
|
|
303
|
+
if (args.options.priority !== undefined) {
|
|
304
|
+
if (typeof args.options.priority === "number") {
|
|
305
|
+
if (isNaN(args.options.priority) || args.options.priority < 0 || args.options.priority > 10 || !Number.isInteger(args.options.priority)) {
|
|
306
|
+
return 'priority should be an integer between 0 and 10.';
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
else if (taskPriority_1.taskPriority.priorityValues.map(l => l.toLowerCase()).indexOf(args.options.priority.toString().toLowerCase()) === -1) {
|
|
310
|
+
return `${args.options.priority} is not a valid priority value. Allowed values are ${taskPriority_1.taskPriority.priorityValues.join('|')}.`;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
264
313
|
return true;
|
|
265
314
|
}
|
|
266
315
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../../../../utils");
|
|
4
|
+
const Auth_1 = require("../../../../Auth");
|
|
5
|
+
const request_1 = require("../../../../request");
|
|
6
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
7
|
+
const commands_1 = require("../../commands");
|
|
8
|
+
class PlannerTaskChecklistItemListCommand extends GraphCommand_1.default {
|
|
9
|
+
get name() {
|
|
10
|
+
return commands_1.default.TASK_CHECKLISTITEM_LIST;
|
|
11
|
+
}
|
|
12
|
+
get description() {
|
|
13
|
+
return "Lists the checklist items of a Planner task.";
|
|
14
|
+
}
|
|
15
|
+
defaultProperties() {
|
|
16
|
+
return ['id', 'title', 'isChecked'];
|
|
17
|
+
}
|
|
18
|
+
commandAction(logger, args, cb) {
|
|
19
|
+
if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
|
|
20
|
+
this.handleError('This command does not support application permissions.', logger, cb);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const requestOptions = {
|
|
24
|
+
url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(args.options.taskId)}/details?$select=checklist`,
|
|
25
|
+
headers: {
|
|
26
|
+
accept: "application/json;odata.metadata=none"
|
|
27
|
+
},
|
|
28
|
+
responseType: "json"
|
|
29
|
+
};
|
|
30
|
+
request_1.default.get(requestOptions).then((res) => {
|
|
31
|
+
if (!args.options.output || args.options.output === 'json') {
|
|
32
|
+
logger.log(res.checklist);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
//converted to text friendly output
|
|
36
|
+
const output = Object.getOwnPropertyNames(res.checklist).map(prop => (Object.assign({ id: prop }, res.checklist[prop])));
|
|
37
|
+
logger.log(output);
|
|
38
|
+
}
|
|
39
|
+
cb();
|
|
40
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
41
|
+
}
|
|
42
|
+
options() {
|
|
43
|
+
const options = [
|
|
44
|
+
{
|
|
45
|
+
option: "-i, --taskId <taskId>"
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
const parentOptions = super.options();
|
|
49
|
+
return options.concat(parentOptions);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
module.exports = new PlannerTaskChecklistItemListCommand();
|
|
53
|
+
//# sourceMappingURL=task-checklistitem-list.js.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_1 = require("../../../../cli");
|
|
4
|
+
const request_1 = require("../../../../request");
|
|
5
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class PlannerTaskChecklistItemRemoveCommand extends GraphCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.TASK_CHECKLISTITEM_REMOVE;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Removes the checklist item from the planner task';
|
|
13
|
+
}
|
|
14
|
+
getTelemetryProperties(args) {
|
|
15
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
16
|
+
telemetryProps.confirm = (!(!args.options.confirm)).toString();
|
|
17
|
+
return telemetryProps;
|
|
18
|
+
}
|
|
19
|
+
commandAction(logger, args, cb) {
|
|
20
|
+
if (args.options.confirm) {
|
|
21
|
+
this.removeChecklistitem(logger, args, cb);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
cli_1.Cli.prompt({
|
|
25
|
+
type: 'confirm',
|
|
26
|
+
name: 'continue',
|
|
27
|
+
default: false,
|
|
28
|
+
message: `Are you sure you want to remove the checklist item with id ${args.options.id} from the planner task?`
|
|
29
|
+
}, (result) => {
|
|
30
|
+
if (!result.continue) {
|
|
31
|
+
cb();
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this.removeChecklistitem(logger, args, cb);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
removeChecklistitem(logger, args, cb) {
|
|
40
|
+
this
|
|
41
|
+
.getTaskDetails(args.options.taskId)
|
|
42
|
+
.then(task => {
|
|
43
|
+
if (!task.checklist || !task.checklist[args.options.id]) {
|
|
44
|
+
return Promise.reject(`The specified checklist item with id ${args.options.id} does not exist`);
|
|
45
|
+
}
|
|
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': task['@odata.etag'],
|
|
51
|
+
'Prefer': 'return=representation'
|
|
52
|
+
},
|
|
53
|
+
responseType: 'json',
|
|
54
|
+
data: {
|
|
55
|
+
checklist: {
|
|
56
|
+
[args.options.id]: null
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return request_1.default.patch(requestOptionsTaskDetails);
|
|
61
|
+
})
|
|
62
|
+
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
63
|
+
}
|
|
64
|
+
getTaskDetails(taskId) {
|
|
65
|
+
const requestOptions = {
|
|
66
|
+
url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(taskId)}/details?$select=checklist`,
|
|
67
|
+
headers: {
|
|
68
|
+
accept: 'application/json;odata.metadata=minimal'
|
|
69
|
+
},
|
|
70
|
+
responseType: 'json'
|
|
71
|
+
};
|
|
72
|
+
return request_1.default.get(requestOptions);
|
|
73
|
+
}
|
|
74
|
+
options() {
|
|
75
|
+
const options = [
|
|
76
|
+
{ option: '-i, --id <id>' },
|
|
77
|
+
{ option: '--taskId <taskId>' },
|
|
78
|
+
{ option: '--confirm' }
|
|
79
|
+
];
|
|
80
|
+
const parentOptions = super.options();
|
|
81
|
+
return options.concat(parentOptions);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
module.exports = new PlannerTaskChecklistItemRemoveCommand();
|
|
85
|
+
//# sourceMappingURL=task-checklistitem-remove.js.map
|
|
@@ -31,6 +31,10 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
|
|
|
31
31
|
}
|
|
32
32
|
commandAction(logger, args, cb) {
|
|
33
33
|
this.showDeprecationWarning(logger, commands_1.default.TASK_DETAILS_GET, commands_1.default.TASK_GET);
|
|
34
|
+
if (args.options.planName) {
|
|
35
|
+
args.options.planTitle = args.options.planName;
|
|
36
|
+
this.warn(logger, `Option 'planName' is deprecated. Please use 'planTitle' instead`);
|
|
37
|
+
}
|
|
34
38
|
if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
|
|
35
39
|
this.handleError('This command does not support application permissions.', logger, cb);
|
|
36
40
|
return;
|
|
@@ -135,7 +139,7 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
|
|
|
135
139
|
}
|
|
136
140
|
return this
|
|
137
141
|
.getGroupId(options)
|
|
138
|
-
.then(groupId => planner_1.planner.
|
|
142
|
+
.then(groupId => planner_1.planner.getPlanByTitle(options.planTitle, groupId))
|
|
139
143
|
.then(plan => plan.id);
|
|
140
144
|
}
|
|
141
145
|
getGroupId(options) {
|
|
@@ -160,6 +164,7 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
|
|
|
160
164
|
{ option: '--bucketName [bucketName]' },
|
|
161
165
|
{ option: '--planId [planId]' },
|
|
162
166
|
{ option: '--planName [planName]' },
|
|
167
|
+
{ option: '--planTitle [planTitle]' },
|
|
163
168
|
{ option: '--ownerGroupId [ownerGroupId]' },
|
|
164
169
|
{ option: '--ownerGroupName [ownerGroupName]' }
|
|
165
170
|
];
|
|
@@ -173,17 +178,17 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
|
|
|
173
178
|
if (args.options.title && args.options.bucketId && args.options.bucketName) {
|
|
174
179
|
return 'Specify either bucketId or bucketName when using title but not both';
|
|
175
180
|
}
|
|
176
|
-
if (args.options.bucketName && !args.options.planId && !args.options.planName) {
|
|
177
|
-
return 'Specify either planId or
|
|
181
|
+
if (args.options.bucketName && !args.options.planId && !args.options.planName && !args.options.planTitle) {
|
|
182
|
+
return 'Specify either planId or planTitle when using bucketName';
|
|
178
183
|
}
|
|
179
|
-
if (args.options.bucketName && args.options.planId && args.options.planName) {
|
|
180
|
-
return 'Specify either planId or
|
|
184
|
+
if (args.options.bucketName && args.options.planId && (args.options.planName || args.options.planTitle)) {
|
|
185
|
+
return 'Specify either planId or planTitle when using bucketName but not both';
|
|
181
186
|
}
|
|
182
|
-
if (args.options.planName && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
183
|
-
return 'Specify either ownerGroupId or ownerGroupName when using
|
|
187
|
+
if ((args.options.planName || args.options.planTitle) && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
188
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
184
189
|
}
|
|
185
|
-
if (args.options.planName && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
186
|
-
return 'Specify either ownerGroupId or ownerGroupName when using
|
|
190
|
+
if ((args.options.planName || args.options.planTitle) && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
191
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
187
192
|
}
|
|
188
193
|
if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
189
194
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
@@ -20,6 +20,7 @@ class PlannerTaskListCommand extends GraphCommand_1.default {
|
|
|
20
20
|
telemetryProps.bucketName = typeof args.options.bucketName !== 'undefined';
|
|
21
21
|
telemetryProps.planId = typeof args.options.planId !== 'undefined';
|
|
22
22
|
telemetryProps.planName = typeof args.options.planName !== 'undefined';
|
|
23
|
+
telemetryProps.planTitle = typeof args.options.planTitle !== 'undefined';
|
|
23
24
|
telemetryProps.ownerGroupId = typeof args.options.ownerGroupId !== 'undefined';
|
|
24
25
|
telemetryProps.ownerGroupName = typeof args.options.ownerGroupName !== 'undefined';
|
|
25
26
|
return telemetryProps;
|
|
@@ -28,13 +29,17 @@ class PlannerTaskListCommand extends GraphCommand_1.default {
|
|
|
28
29
|
return ['id', 'title', 'startDateTime', 'dueDateTime', 'completedDateTime'];
|
|
29
30
|
}
|
|
30
31
|
commandAction(logger, args, cb) {
|
|
32
|
+
if (args.options.planName) {
|
|
33
|
+
args.options.planTitle = args.options.planName;
|
|
34
|
+
this.warn(logger, `Option 'planName' is deprecated. Please use 'planTitle' instead`);
|
|
35
|
+
}
|
|
31
36
|
if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
|
|
32
37
|
this.handleError('This command does not support application permissions.', logger, cb);
|
|
33
38
|
return;
|
|
34
39
|
}
|
|
35
40
|
const bucketName = args.options.bucketName;
|
|
36
41
|
let bucketId = args.options.bucketId;
|
|
37
|
-
const
|
|
42
|
+
const planTitle = args.options.planTitle;
|
|
38
43
|
let planId = args.options.planId;
|
|
39
44
|
let taskItems = [];
|
|
40
45
|
if (bucketId || bucketName) {
|
|
@@ -53,7 +58,7 @@ class PlannerTaskListCommand extends GraphCommand_1.default {
|
|
|
53
58
|
cb();
|
|
54
59
|
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
55
60
|
}
|
|
56
|
-
else if (planId ||
|
|
61
|
+
else if (planId || planTitle) {
|
|
57
62
|
this
|
|
58
63
|
.getPlanId(args)
|
|
59
64
|
.then((retrievedPlanId) => {
|
|
@@ -112,7 +117,7 @@ class PlannerTaskListCommand extends GraphCommand_1.default {
|
|
|
112
117
|
}
|
|
113
118
|
return this
|
|
114
119
|
.getGroupId(args)
|
|
115
|
-
.then((groupId) => planner_1.planner.
|
|
120
|
+
.then((groupId) => planner_1.planner.getPlanByTitle(args.options.planTitle, groupId))
|
|
116
121
|
.then(plan => plan.id);
|
|
117
122
|
}
|
|
118
123
|
getGroupId(args) {
|
|
@@ -148,6 +153,9 @@ class PlannerTaskListCommand extends GraphCommand_1.default {
|
|
|
148
153
|
{
|
|
149
154
|
option: '--planName [planName]'
|
|
150
155
|
},
|
|
156
|
+
{
|
|
157
|
+
option: '--planTitle [planTitle]'
|
|
158
|
+
},
|
|
151
159
|
{
|
|
152
160
|
option: '--ownerGroupId [ownerGroupId]'
|
|
153
161
|
},
|
|
@@ -162,17 +170,17 @@ class PlannerTaskListCommand extends GraphCommand_1.default {
|
|
|
162
170
|
if (args.options.bucketId && args.options.bucketName) {
|
|
163
171
|
return 'To retrieve tasks from a bucket, specify bucketId or bucketName, but not both';
|
|
164
172
|
}
|
|
165
|
-
if (args.options.bucketName && !args.options.planId && !args.options.planName) {
|
|
166
|
-
return 'Specify either planId or
|
|
173
|
+
if (args.options.bucketName && !args.options.planId && !args.options.planName && !args.options.planTitle) {
|
|
174
|
+
return 'Specify either planId or planTitle when using bucketName';
|
|
167
175
|
}
|
|
168
|
-
if (args.options.planId && args.options.planName) {
|
|
169
|
-
return 'Specify either planId or
|
|
176
|
+
if (args.options.planId && (args.options.planName || args.options.planTitle)) {
|
|
177
|
+
return 'Specify either planId or planTitle but not both';
|
|
170
178
|
}
|
|
171
|
-
if (args.options.planName && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
172
|
-
return 'Specify either ownerGroupId or ownerGroupName when using
|
|
179
|
+
if ((args.options.planName || args.options.planTitle) && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
180
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
173
181
|
}
|
|
174
|
-
if (args.options.planName && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
175
|
-
return 'Specify either ownerGroupId or ownerGroupName when using
|
|
182
|
+
if ((args.options.planName || args.options.planTitle) && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
183
|
+
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
176
184
|
}
|
|
177
185
|
if (args.options.ownerGroupId && !utils_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
178
186
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
@@ -46,13 +46,7 @@ class PlannerTaskReferenceAddCommand extends GraphCommand_1.default {
|
|
|
46
46
|
};
|
|
47
47
|
return request_1.default
|
|
48
48
|
.get(requestOptions)
|
|
49
|
-
.then((response) =>
|
|
50
|
-
const etag = response ? response['@odata.etag'] : undefined;
|
|
51
|
-
if (!etag) {
|
|
52
|
-
return Promise.reject(`Error fetching task details`);
|
|
53
|
-
}
|
|
54
|
-
return Promise.resolve(etag);
|
|
55
|
-
});
|
|
49
|
+
.then((response) => response['@odata.etag']);
|
|
56
50
|
}
|
|
57
51
|
options() {
|
|
58
52
|
const options = [
|