@pnp/cli-microsoft365 5.4.0-beta.96022f3 → 5.4.0-beta.a265e0b
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/m365/base/PlannerCommand.js +10 -0
- package/dist/m365/planner/commands/task/task-get.js +36 -10
- package/dist/m365/planner/commands/tenant/tenant-settings-list.js +33 -0
- package/dist/m365/planner/commands.js +2 -1
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +102 -0
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/team/team-get.js +1 -1
- package/docs/docs/cmd/file/file-list.md +4 -4
- package/docs/docs/cmd/planner/task/task-get.md +3 -0
- package/docs/docs/cmd/planner/tenant/tenant-settings-list.md +28 -0
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-list.md +64 -0
- package/package.json +1 -1
- package/dist/m365/planner/commands/task/task-details-get.js +0 -45
- package/docs/docs/cmd/planner/task/task-details-get.md +0 -24
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Command_1 = require("../../Command");
|
|
4
|
+
class PlannerCommand extends Command_1.default {
|
|
5
|
+
get resource() {
|
|
6
|
+
return 'https://tasks.office.com';
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.default = PlannerCommand;
|
|
10
|
+
//# sourceMappingURL=PlannerCommand.js.map
|
|
@@ -11,6 +11,9 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
|
|
|
11
11
|
get name() {
|
|
12
12
|
return commands_1.default.TASK_GET;
|
|
13
13
|
}
|
|
14
|
+
alias() {
|
|
15
|
+
return [commands_1.default.TASK_DETAILS_GET];
|
|
16
|
+
}
|
|
14
17
|
get description() {
|
|
15
18
|
return 'Retrieve the specified planner task';
|
|
16
19
|
}
|
|
@@ -27,27 +30,49 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
|
|
|
27
30
|
return telemetryProps;
|
|
28
31
|
}
|
|
29
32
|
commandAction(logger, args, cb) {
|
|
33
|
+
this.showDeprecationWarning(logger, commands_1.default.TASK_DETAILS_GET, commands_1.default.TASK_GET);
|
|
30
34
|
if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
|
|
31
35
|
this.handleError('This command does not support application permissions.', logger, cb);
|
|
32
36
|
return;
|
|
33
37
|
}
|
|
38
|
+
// This check has been added to support task details get alias. Needs to be removed when deprecation is removed.
|
|
39
|
+
if (args.options.taskId) {
|
|
40
|
+
args.options.id = args.options.taskId;
|
|
41
|
+
}
|
|
34
42
|
this
|
|
35
43
|
.getTaskId(args.options)
|
|
36
|
-
.then(taskId =>
|
|
37
|
-
|
|
38
|
-
url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(taskId)}`,
|
|
39
|
-
headers: {
|
|
40
|
-
accept: 'application/json;odata.metadata=none'
|
|
41
|
-
},
|
|
42
|
-
responseType: 'json'
|
|
43
|
-
};
|
|
44
|
-
return request_1.default.get(requestOptions);
|
|
45
|
-
})
|
|
44
|
+
.then(taskId => this.getTask(taskId))
|
|
45
|
+
.then(task => this.getTaskDetails(task))
|
|
46
46
|
.then((res) => {
|
|
47
47
|
logger.log(res);
|
|
48
48
|
cb();
|
|
49
49
|
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
50
50
|
}
|
|
51
|
+
getTask(taskId) {
|
|
52
|
+
const requestOptions = {
|
|
53
|
+
url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(taskId)}`,
|
|
54
|
+
headers: {
|
|
55
|
+
accept: 'application/json;odata.metadata=none'
|
|
56
|
+
},
|
|
57
|
+
responseType: 'json'
|
|
58
|
+
};
|
|
59
|
+
return request_1.default.get(requestOptions);
|
|
60
|
+
}
|
|
61
|
+
getTaskDetails(task) {
|
|
62
|
+
const requestOptionsTaskDetails = {
|
|
63
|
+
url: `${this.resource}/v1.0/planner/tasks/${task.id}/details`,
|
|
64
|
+
headers: {
|
|
65
|
+
'accept': 'application/json;odata.metadata=none',
|
|
66
|
+
'Prefer': 'return=representation'
|
|
67
|
+
},
|
|
68
|
+
responseType: 'json'
|
|
69
|
+
};
|
|
70
|
+
return request_1.default
|
|
71
|
+
.get(requestOptionsTaskDetails)
|
|
72
|
+
.then(taskDetails => {
|
|
73
|
+
return Object.assign(Object.assign({}, task), taskDetails);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
51
76
|
getTaskId(options) {
|
|
52
77
|
if (options.id) {
|
|
53
78
|
return Promise.resolve(options.id);
|
|
@@ -128,6 +153,7 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
|
|
|
128
153
|
}
|
|
129
154
|
options() {
|
|
130
155
|
const options = [
|
|
156
|
+
{ option: '--taskId [taskId]' },
|
|
131
157
|
{ option: '-i, --id [id]' },
|
|
132
158
|
{ option: '-t, --title [title]' },
|
|
133
159
|
{ option: '--bucketId [bucketId]' },
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const PlannerCommand_1 = require("../../../base/PlannerCommand");
|
|
5
|
+
const commands_1 = require("../../commands");
|
|
6
|
+
class PlannerTenantSettingsListCommand extends PlannerCommand_1.default {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands_1.default.TENANT_SETTINGS_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Lists the Microsoft Planner configuration of the tenant';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['isPlannerAllowed', 'allowCalendarSharing', 'allowTenantMoveWithDataLoss', 'allowTenantMoveWithDataMigration', 'allowRosterCreation', 'allowPlannerMobilePushNotifications'];
|
|
15
|
+
}
|
|
16
|
+
commandAction(logger, args, cb) {
|
|
17
|
+
const requestOptions = {
|
|
18
|
+
url: `${this.resource}/taskAPI/tenantAdminSettings/Settings`,
|
|
19
|
+
headers: {
|
|
20
|
+
accept: 'application/json;odata.metadata=none'
|
|
21
|
+
},
|
|
22
|
+
responseType: 'json'
|
|
23
|
+
};
|
|
24
|
+
request_1.default
|
|
25
|
+
.get(requestOptions)
|
|
26
|
+
.then((result) => {
|
|
27
|
+
logger.log(result);
|
|
28
|
+
cb();
|
|
29
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
module.exports = new PlannerTenantSettingsListCommand();
|
|
33
|
+
//# sourceMappingURL=tenant-settings-list.js.map
|
|
@@ -19,6 +19,7 @@ exports.default = {
|
|
|
19
19
|
TASK_REFERENCE_ADD: `${prefix} task reference add`,
|
|
20
20
|
TASK_REFERENCE_LIST: `${prefix} task reference list`,
|
|
21
21
|
TASK_REMOVE: `${prefix} task remove`,
|
|
22
|
-
TASK_SET: `${prefix} task set
|
|
22
|
+
TASK_SET: `${prefix} task set`,
|
|
23
|
+
TENANT_SETTINGS_LIST: `${prefix} tenant settings list`
|
|
23
24
|
};
|
|
24
25
|
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const request_1 = require("../../../../request");
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
6
|
+
const commands_1 = require("../../commands");
|
|
7
|
+
class SpoEventreceiverListCommand extends SpoCommand_1.default {
|
|
8
|
+
get name() {
|
|
9
|
+
return commands_1.default.EVENTRECEIVER_LIST;
|
|
10
|
+
}
|
|
11
|
+
get description() {
|
|
12
|
+
return 'Retrieves event receivers for the specified web, site or list.';
|
|
13
|
+
}
|
|
14
|
+
defaultProperties() {
|
|
15
|
+
return ['ReceiverId', 'ReceiverName'];
|
|
16
|
+
}
|
|
17
|
+
getTelemetryProperties(args) {
|
|
18
|
+
const telemetryProps = super.getTelemetryProperties(args);
|
|
19
|
+
telemetryProps.listId = typeof args.options.listId !== 'undefined';
|
|
20
|
+
telemetryProps.listTitle = typeof args.options.listTitle !== 'undefined';
|
|
21
|
+
telemetryProps.listUrl = typeof args.options.listUrl !== 'undefined';
|
|
22
|
+
telemetryProps.scope = typeof args.options.scope !== 'undefined';
|
|
23
|
+
return telemetryProps;
|
|
24
|
+
}
|
|
25
|
+
commandAction(logger, args, cb) {
|
|
26
|
+
let requestUrl = `${args.options.webUrl}/_api/`;
|
|
27
|
+
let listUrl = '';
|
|
28
|
+
if (args.options.listId) {
|
|
29
|
+
listUrl = `lists(guid'${encodeURIComponent(args.options.listId)}')/`;
|
|
30
|
+
}
|
|
31
|
+
else if (args.options.listTitle) {
|
|
32
|
+
listUrl = `lists/getByTitle('${encodeURIComponent(args.options.listTitle)}')/`;
|
|
33
|
+
}
|
|
34
|
+
else if (args.options.listUrl) {
|
|
35
|
+
const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
36
|
+
listUrl = `GetList('${encodeURIComponent(listServerRelativeUrl)}')/`;
|
|
37
|
+
}
|
|
38
|
+
if (!args.options.scope || args.options.scope === 'web') {
|
|
39
|
+
requestUrl += `web/${listUrl}eventreceivers`;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
requestUrl += 'site/eventreceivers';
|
|
43
|
+
}
|
|
44
|
+
const requestOptions = {
|
|
45
|
+
url: requestUrl,
|
|
46
|
+
headers: {
|
|
47
|
+
'accept': 'application/json;odata=nometadata'
|
|
48
|
+
},
|
|
49
|
+
responseType: 'json'
|
|
50
|
+
};
|
|
51
|
+
request_1.default
|
|
52
|
+
.get(requestOptions)
|
|
53
|
+
.then((res) => {
|
|
54
|
+
logger.log(res.value);
|
|
55
|
+
cb();
|
|
56
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
57
|
+
}
|
|
58
|
+
options() {
|
|
59
|
+
const options = [
|
|
60
|
+
{
|
|
61
|
+
option: '-u, --webUrl <webUrl>'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
option: '--listTitle [listTitle]'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
option: '--listId [listId]'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
option: '--listUrl [listUrl]'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
option: '-s, --scope [scope]',
|
|
74
|
+
autocomplete: ['web', 'site']
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
const parentOptions = super.options();
|
|
78
|
+
return options.concat(parentOptions);
|
|
79
|
+
}
|
|
80
|
+
validate(args) {
|
|
81
|
+
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
82
|
+
if (isValidSharePointUrl !== true) {
|
|
83
|
+
return isValidSharePointUrl;
|
|
84
|
+
}
|
|
85
|
+
const listOptions = [args.options.listId, args.options.listTitle, args.options.listUrl];
|
|
86
|
+
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
87
|
+
return `Specify either list id or title or list url`;
|
|
88
|
+
}
|
|
89
|
+
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
90
|
+
return `${args.options.listId} is not a valid GUID`;
|
|
91
|
+
}
|
|
92
|
+
if (args.options.scope && ['web', 'site'].indexOf(args.options.scope) === -1) {
|
|
93
|
+
return `${args.options.scope} is not a valid type value. Allowed values web|site.`;
|
|
94
|
+
}
|
|
95
|
+
if (args.options.scope && args.options.scope === 'site' && (args.options.listId || args.options.listUrl || args.options.listTitle)) {
|
|
96
|
+
return 'Scope cannot be set to site when retrieving list event receivers.';
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
module.exports = new SpoEventreceiverListCommand();
|
|
102
|
+
//# sourceMappingURL=eventreceiver-list.js.map
|
|
@@ -36,6 +36,7 @@ exports.default = {
|
|
|
36
36
|
CUSTOMACTION_LIST: `${prefix} customaction list`,
|
|
37
37
|
CUSTOMACTION_REMOVE: `${prefix} customaction remove`,
|
|
38
38
|
EVENTRECEIVER_GET: `${prefix} eventreceiver get`,
|
|
39
|
+
EVENTRECEIVER_LIST: `${prefix} eventreceiver list`,
|
|
39
40
|
EXTERNALUSER_LIST: `${prefix} externaluser list`,
|
|
40
41
|
FEATURE_DISABLE: `${prefix} feature disable`,
|
|
41
42
|
FEATURE_ENABLE: `${prefix} feature enable`,
|
|
@@ -23,7 +23,7 @@ class TeamsTeamGetCommand extends GraphCommand_1.default {
|
|
|
23
23
|
return Promise.resolve(args.options.id);
|
|
24
24
|
}
|
|
25
25
|
return aadGroup_1.aadGroup
|
|
26
|
-
.getGroupByDisplayName(args.options.
|
|
26
|
+
.getGroupByDisplayName(args.options.name)
|
|
27
27
|
.then(group => {
|
|
28
28
|
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
29
29
|
return Promise.reject(`The specified team does not exist in the Microsoft Teams`);
|
|
@@ -27,20 +27,20 @@ This command is an improved version of the `spo file list` command. The main dif
|
|
|
27
27
|
|
|
28
28
|
## Examples
|
|
29
29
|
|
|
30
|
-
Return all files from folder _Shared Documents_ located in site _https://contoso.sharepoint.com/sites/project-x_
|
|
30
|
+
Return all files from the folder _Shared Documents_ located in site _https://contoso.sharepoint.com/sites/project-x_
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
m365 file list --webUrl https://contoso.sharepoint.com/sites/project-x --
|
|
33
|
+
m365 file list --webUrl https://contoso.sharepoint.com/sites/project-x --folderUrl 'Shared Documents'
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Return all files from the folder _Shared Documents_ and all the sub-folders of _Shared Documents_ located in site _https://contoso.sharepoint.com/sites/project-x_
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
|
-
m365 file list --webUrl https://contoso.sharepoint.com/sites/project-x --
|
|
39
|
+
m365 file list --webUrl https://contoso.sharepoint.com/sites/project-x --folderUrl 'Shared Documents' --recursive
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Return all files from the _Important_ folder in the _Shared Documents_ document library located in site _https://contoso.sharepoint.com/sites/project-x_
|
|
43
43
|
|
|
44
44
|
```sh
|
|
45
|
-
m365 file list --webUrl https://contoso.sharepoint.com/sites/project-x --
|
|
45
|
+
m365 file list --webUrl https://contoso.sharepoint.com/sites/project-x --folderUrl 'Shared Documents/Important'
|
|
46
46
|
```
|
|
@@ -16,6 +16,9 @@ m365 planner task get [options]
|
|
|
16
16
|
`-t, --title [title]`
|
|
17
17
|
: Title of the task. Specify either `id` or `title` but not both.
|
|
18
18
|
|
|
19
|
+
`--taskId [taskId]`
|
|
20
|
+
: (deprecated. Use `id` instead) ID of the task.
|
|
21
|
+
|
|
19
22
|
`--bucketId [bucketId]`
|
|
20
23
|
: Bucket ID to which the task belongs. Specify `bucketId` or `bucketName` when using `title`.
|
|
21
24
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# planner tenant settings list
|
|
2
|
+
|
|
3
|
+
Lists the Microsoft Planner configuration of the tenant
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 planner tenant settings list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
--8<-- "docs/cmd/_global.md"
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
!!! important
|
|
18
|
+
To use this command you must be a global administrator.
|
|
19
|
+
|
|
20
|
+
After executing the command `planner tenant settings set`, it can take some time for all changes to propagate across the tenant. Because of this, executing this command right away can return some unexpected results.
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
Lists the Microsoft Planner settings of the tenant
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
m365 planner tenant settings list
|
|
28
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# spo eventreceiver list
|
|
2
|
+
|
|
3
|
+
Retrieves event receivers for the specified web, site or list.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo eventreceiver list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: The URL of the web for which to retrieve the event receivers.
|
|
15
|
+
|
|
16
|
+
`--listTitle [listTitle]`
|
|
17
|
+
: The title of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_.
|
|
18
|
+
Specify either `listTitle`, `listId` or `listUrl`.
|
|
19
|
+
|
|
20
|
+
`--listId [listId]`
|
|
21
|
+
: The id of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_.
|
|
22
|
+
Specify either `listTitle`, `listId` or `listUrl`.
|
|
23
|
+
|
|
24
|
+
`--listUrl [listUrl]`
|
|
25
|
+
: The url of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_.
|
|
26
|
+
Specify either `listTitle`, `listId` or `listUrl`.
|
|
27
|
+
|
|
28
|
+
`-s, --scope [scope]`
|
|
29
|
+
: The scope of which to retrieve the Event Receivers.
|
|
30
|
+
Can be either "site" or "web". Defaults to "web". Only applicable when not specifying any of the list properties.
|
|
31
|
+
|
|
32
|
+
--8<-- "docs/cmd/_global.md"
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
Retrieves event receivers in web _<https://contoso.sharepoint.com/sites/contoso-sales>_.
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Retrieves event receivers in site _<https://contoso.sharepoint.com/sites/contoso-sales>_.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --scope site
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Retrieves event receivers for list with title _Events_ in web _<https://contoso.sharepoint.com/sites/contoso-sales>_.
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listTitle Events
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Retrieves event receivers for list with ID _202b8199-b9de-43fd-9737-7f213f51c991_ in web _<https://contoso.sharepoint.com/sites/contoso-sales>_.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listId '202b8199-b9de-43fd-9737-7f213f51c991'
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Retrieves event receivers for list with url _/sites/contoso-sales/lists/Events_ in web _<https://contoso.sharepoint.com/sites/contoso-sales>_.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/sites/contoso-sales/lists/Events'
|
|
64
|
+
```
|
package/package.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
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 PlannerTaskDetailsGetCommand extends GraphCommand_1.default {
|
|
9
|
-
get name() {
|
|
10
|
-
return commands_1.default.TASK_DETAILS_GET;
|
|
11
|
-
}
|
|
12
|
-
get description() {
|
|
13
|
-
return 'Retrieve the details of the specified planner task';
|
|
14
|
-
}
|
|
15
|
-
commandAction(logger, args, cb) {
|
|
16
|
-
if (utils_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken)) {
|
|
17
|
-
this.handleError('This command does not support application permissions.', logger, cb);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const requestOptions = {
|
|
21
|
-
url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(args.options.taskId)}/details`,
|
|
22
|
-
headers: {
|
|
23
|
-
accept: 'application/json;odata.metadata=none'
|
|
24
|
-
},
|
|
25
|
-
responseType: 'json'
|
|
26
|
-
};
|
|
27
|
-
request_1.default
|
|
28
|
-
.get(requestOptions)
|
|
29
|
-
.then((res) => {
|
|
30
|
-
logger.log(res);
|
|
31
|
-
cb();
|
|
32
|
-
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
33
|
-
}
|
|
34
|
-
options() {
|
|
35
|
-
const options = [
|
|
36
|
-
{
|
|
37
|
-
option: '-i, --taskId <taskId>'
|
|
38
|
-
}
|
|
39
|
-
];
|
|
40
|
-
const parentOptions = super.options();
|
|
41
|
-
return options.concat(parentOptions);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
module.exports = new PlannerTaskDetailsGetCommand();
|
|
45
|
-
//# sourceMappingURL=task-details-get.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# planner task details get
|
|
2
|
-
|
|
3
|
-
Retrieve the details of the specified planner task
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
m365 planner task details get [options]
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Options
|
|
12
|
-
|
|
13
|
-
`-i, --taskId <taskId>`
|
|
14
|
-
: ID of the task to retrieve details from
|
|
15
|
-
|
|
16
|
-
--8<-- "docs/cmd/_global.md"
|
|
17
|
-
|
|
18
|
-
## Examples
|
|
19
|
-
|
|
20
|
-
Retrieve the details of the specified planner task
|
|
21
|
-
|
|
22
|
-
```sh
|
|
23
|
-
m365 planner task details get --taskId 'vzCcZoOv-U27PwydxHB8opcADJo-'
|
|
24
|
-
```
|