@pnp/cli-microsoft365 6.3.0-beta.1140b31 → 6.3.0-beta.3f7129c
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/flow/commands/run/run-list.js +55 -3
- package/dist/m365/planner/commands/roster/roster-add.js +47 -0
- package/dist/m365/planner/commands/roster/roster-remove.js +88 -0
- package/dist/m365/planner/commands.js +2 -0
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +17 -3
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +4 -7
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +118 -0
- package/dist/m365/spo/commands/web/web-set.js +11 -4
- package/dist/m365/spo/commands.js +1 -0
- package/docs/docs/cmd/aad/app/app-list.md +3 -0
- package/docs/docs/cmd/aad/user/user-set.md +1 -1
- package/docs/docs/cmd/flow/run/run-list.md +21 -0
- package/docs/docs/cmd/planner/plan/plan-remove.md +4 -0
- package/docs/docs/cmd/planner/roster/roster-add.md +60 -0
- package/docs/docs/cmd/planner/roster/roster-remove.md +48 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +2 -2
- package/docs/docs/cmd/spo/listitem/listitem-isrecord.md +2 -2
- package/docs/docs/cmd/spo/navigation/navigation-node-add.md +18 -3
- package/docs/docs/cmd/spo/navigation/navigation-node-list.md +30 -0
- package/docs/docs/cmd/spo/navigation/navigation-node-remove.md +1 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-set.md +59 -0
- package/docs/docs/cmd/spo/web/web-set.md +9 -0
- package/package.json +1 -1
|
@@ -13,9 +13,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _FlowRunListCommand_instances, _FlowRunListCommand_initOptions;
|
|
16
|
+
var _FlowRunListCommand_instances, _FlowRunListCommand_initTelemetry, _FlowRunListCommand_initOptions, _FlowRunListCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const formatting_1 = require("../../../../utils/formatting");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const AzmgmtItemsListCommand_1 = require("../../../base/AzmgmtItemsListCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
21
22
|
class FlowRunListCommand extends AzmgmtItemsListCommand_1.AzmgmtItemsListCommand {
|
|
@@ -31,14 +32,21 @@ class FlowRunListCommand extends AzmgmtItemsListCommand_1.AzmgmtItemsListCommand
|
|
|
31
32
|
constructor() {
|
|
32
33
|
super();
|
|
33
34
|
_FlowRunListCommand_instances.add(this);
|
|
35
|
+
this.allowedStatusses = ['Succeeded', 'Running', 'Failed', 'Cancelled'];
|
|
36
|
+
__classPrivateFieldGet(this, _FlowRunListCommand_instances, "m", _FlowRunListCommand_initTelemetry).call(this);
|
|
34
37
|
__classPrivateFieldGet(this, _FlowRunListCommand_instances, "m", _FlowRunListCommand_initOptions).call(this);
|
|
38
|
+
__classPrivateFieldGet(this, _FlowRunListCommand_instances, "m", _FlowRunListCommand_initValidators).call(this);
|
|
35
39
|
}
|
|
36
40
|
commandAction(logger, args) {
|
|
37
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
42
|
if (this.verbose) {
|
|
39
43
|
logger.logToStderr(`Retrieving list of runs for Microsoft Flow ${args.options.flowName}...`);
|
|
40
44
|
}
|
|
41
|
-
|
|
45
|
+
let url = `${this.resource}providers/Microsoft.ProcessSimple/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting_1.formatting.encodeQueryParameter(args.options.flowName)}/runs?api-version=2016-11-01`;
|
|
46
|
+
const filters = this.getFilters(args.options);
|
|
47
|
+
if (filters.length > 0) {
|
|
48
|
+
url += `&$filter=${filters.join(' and ')}`;
|
|
49
|
+
}
|
|
42
50
|
try {
|
|
43
51
|
yield this.getAllItems(url, logger, true);
|
|
44
52
|
if (this.items.length > 0) {
|
|
@@ -59,13 +67,57 @@ class FlowRunListCommand extends AzmgmtItemsListCommand_1.AzmgmtItemsListCommand
|
|
|
59
67
|
}
|
|
60
68
|
});
|
|
61
69
|
}
|
|
70
|
+
getFilters(options) {
|
|
71
|
+
const filters = [];
|
|
72
|
+
if (options.status) {
|
|
73
|
+
filters.push(`status eq '${options.status}'`);
|
|
74
|
+
}
|
|
75
|
+
if (options.triggerStartTime) {
|
|
76
|
+
filters.push(`startTime ge ${options.triggerStartTime}`);
|
|
77
|
+
}
|
|
78
|
+
if (options.triggerEndTime) {
|
|
79
|
+
filters.push(`startTime lt ${options.triggerEndTime}`);
|
|
80
|
+
}
|
|
81
|
+
return filters;
|
|
82
|
+
}
|
|
62
83
|
}
|
|
63
|
-
_FlowRunListCommand_instances = new WeakSet(),
|
|
84
|
+
_FlowRunListCommand_instances = new WeakSet(), _FlowRunListCommand_initTelemetry = function _FlowRunListCommand_initTelemetry() {
|
|
85
|
+
this.telemetry.push((args) => {
|
|
86
|
+
Object.assign(this.telemetryProperties, {
|
|
87
|
+
status: typeof args.options.status !== 'undefined',
|
|
88
|
+
triggerStartTime: typeof args.options.triggerStartTime !== 'undefined',
|
|
89
|
+
triggerEndTime: typeof args.options.triggerEndTime !== 'undefined'
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}, _FlowRunListCommand_initOptions = function _FlowRunListCommand_initOptions() {
|
|
64
93
|
this.options.unshift({
|
|
65
94
|
option: '-f, --flowName <flowName>'
|
|
66
95
|
}, {
|
|
67
96
|
option: '-e, --environmentName <environmentName>'
|
|
97
|
+
}, {
|
|
98
|
+
option: '--status [status]',
|
|
99
|
+
autocomplete: this.allowedStatusses
|
|
100
|
+
}, {
|
|
101
|
+
option: '--triggerStartTime [triggerStartTime]'
|
|
102
|
+
}, {
|
|
103
|
+
option: '--triggerEndTime [triggerEndTime]'
|
|
68
104
|
});
|
|
105
|
+
}, _FlowRunListCommand_initValidators = function _FlowRunListCommand_initValidators() {
|
|
106
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
if (!validation_1.validation.isValidGuid(args.options.flowName)) {
|
|
108
|
+
return `${args.options.flowName} is not a valid GUID`;
|
|
109
|
+
}
|
|
110
|
+
if (args.options.status && this.allowedStatusses.indexOf(args.options.status) === -1) {
|
|
111
|
+
return `'${args.options.status}' is not a valid status. Allowed values are: ${this.allowedStatusses.join(',')}`;
|
|
112
|
+
}
|
|
113
|
+
if (args.options.triggerStartTime && !validation_1.validation.isValidISODateTime(args.options.triggerStartTime)) {
|
|
114
|
+
return `'${args.options.triggerStartTime}' is not a valid datetime.`;
|
|
115
|
+
}
|
|
116
|
+
if (args.options.triggerEndTime && !validation_1.validation.isValidISODateTime(args.options.triggerEndTime)) {
|
|
117
|
+
return `'${args.options.triggerEndTime}' is not a valid datetime.`;
|
|
118
|
+
}
|
|
119
|
+
return true;
|
|
120
|
+
}));
|
|
69
121
|
};
|
|
70
122
|
module.exports = new FlowRunListCommand();
|
|
71
123
|
//# sourceMappingURL=run-list.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
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 request_1 = require("../../../../request");
|
|
13
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
14
|
+
const commands_1 = require("../../commands");
|
|
15
|
+
class PlannerRosterAddCommand extends GraphCommand_1.default {
|
|
16
|
+
get name() {
|
|
17
|
+
return commands_1.default.ROSTER_ADD;
|
|
18
|
+
}
|
|
19
|
+
get description() {
|
|
20
|
+
return 'Creates a new Microsoft Planner Roster';
|
|
21
|
+
}
|
|
22
|
+
commandAction(logger) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
if (this.verbose) {
|
|
25
|
+
logger.logToStderr('Creating a new Microsoft Planner Roster');
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
const requestBody = {};
|
|
29
|
+
const requestOptions = {
|
|
30
|
+
url: `${this.resource}/beta/planner/rosters`,
|
|
31
|
+
headers: {
|
|
32
|
+
accept: 'application/json;odata.metadata=none'
|
|
33
|
+
},
|
|
34
|
+
data: requestBody,
|
|
35
|
+
responseType: 'json'
|
|
36
|
+
};
|
|
37
|
+
const response = yield request_1.default.post(requestOptions);
|
|
38
|
+
logger.log(response);
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
this.handleRejectedODataJsonPromise(err);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
module.exports = new PlannerRosterAddCommand();
|
|
47
|
+
//# sourceMappingURL=roster-add.js.map
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _PlannerRosterRemoveCommand_instances, _PlannerRosterRemoveCommand_initTelemetry, _PlannerRosterRemoveCommand_initOptions;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
19
|
+
const request_1 = require("../../../../request");
|
|
20
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
|
+
const commands_1 = require("../../commands");
|
|
22
|
+
class PlannerRosterRemoveCommand extends GraphCommand_1.default {
|
|
23
|
+
get name() {
|
|
24
|
+
return commands_1.default.ROSTER_REMOVE;
|
|
25
|
+
}
|
|
26
|
+
get description() {
|
|
27
|
+
return 'Removes a Microsoft Planner Roster';
|
|
28
|
+
}
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
_PlannerRosterRemoveCommand_instances.add(this);
|
|
32
|
+
__classPrivateFieldGet(this, _PlannerRosterRemoveCommand_instances, "m", _PlannerRosterRemoveCommand_initTelemetry).call(this);
|
|
33
|
+
__classPrivateFieldGet(this, _PlannerRosterRemoveCommand_instances, "m", _PlannerRosterRemoveCommand_initOptions).call(this);
|
|
34
|
+
}
|
|
35
|
+
commandAction(logger, args) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (args.options.confirm) {
|
|
38
|
+
yield this.removeRoster(args, logger);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const result = yield Cli_1.Cli.prompt({
|
|
42
|
+
type: 'confirm',
|
|
43
|
+
name: 'continue',
|
|
44
|
+
default: false,
|
|
45
|
+
message: `Are you sure you want to remove roster ${args.options.id}?`
|
|
46
|
+
});
|
|
47
|
+
if (result.continue) {
|
|
48
|
+
yield this.removeRoster(args, logger);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
removeRoster(args, logger) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
if (this.verbose) {
|
|
56
|
+
logger.logToStderr(`Removing roster ${args.options.id}`);
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
const requestOptions = {
|
|
60
|
+
url: `${this.resource}/beta/planner/rosters/${args.options.id}`,
|
|
61
|
+
headers: {
|
|
62
|
+
accept: 'application/json;odata.metadata=none'
|
|
63
|
+
},
|
|
64
|
+
responseType: 'json'
|
|
65
|
+
};
|
|
66
|
+
yield request_1.default.delete(requestOptions);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
this.handleRejectedODataJsonPromise(err);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
_PlannerRosterRemoveCommand_instances = new WeakSet(), _PlannerRosterRemoveCommand_initTelemetry = function _PlannerRosterRemoveCommand_initTelemetry() {
|
|
75
|
+
this.telemetry.push((args) => {
|
|
76
|
+
Object.assign(this.telemetryProperties, {
|
|
77
|
+
confirm: !!args.options.confirm
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}, _PlannerRosterRemoveCommand_initOptions = function _PlannerRosterRemoveCommand_initOptions() {
|
|
81
|
+
this.options.unshift({
|
|
82
|
+
option: '--id <id>'
|
|
83
|
+
}, {
|
|
84
|
+
option: '--confirm'
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
module.exports = new PlannerRosterRemoveCommand();
|
|
88
|
+
//# sourceMappingURL=roster-remove.js.map
|
|
@@ -12,6 +12,8 @@ exports.default = {
|
|
|
12
12
|
PLAN_LIST: `${prefix} plan list`,
|
|
13
13
|
PLAN_REMOVE: `${prefix} plan remove`,
|
|
14
14
|
PLAN_SET: `${prefix} plan set`,
|
|
15
|
+
ROSTER_ADD: `${prefix} roster add`,
|
|
16
|
+
ROSTER_REMOVE: `${prefix} roster remove`,
|
|
15
17
|
TASK_ADD: `${prefix} task add`,
|
|
16
18
|
TASK_CHECKLISTITEM_ADD: `${prefix} task checklistitem add`,
|
|
17
19
|
TASK_CHECKLISTITEM_LIST: `${prefix} task checklistitem list`,
|
|
@@ -38,6 +38,7 @@ class SpoNavigationNodeAddCommand extends SpoCommand_1.default {
|
|
|
38
38
|
return ['url'];
|
|
39
39
|
}
|
|
40
40
|
commandAction(logger, args) {
|
|
41
|
+
var _a;
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
43
|
if (this.verbose) {
|
|
43
44
|
logger.logToStderr(`Adding navigation node...`);
|
|
@@ -51,12 +52,13 @@ class SpoNavigationNodeAddCommand extends SpoCommand_1.default {
|
|
|
51
52
|
accept: 'application/json;odata=nometadata',
|
|
52
53
|
'content-type': 'application/json;odata=nometadata'
|
|
53
54
|
},
|
|
55
|
+
responseType: 'json',
|
|
54
56
|
data: {
|
|
57
|
+
AudienceIds: (_a = args.options.audienceIds) === null || _a === void 0 ? void 0 : _a.split(','),
|
|
55
58
|
Title: args.options.title,
|
|
56
59
|
Url: args.options.url,
|
|
57
60
|
IsExternal: args.options.isExternal === true
|
|
58
|
-
}
|
|
59
|
-
responseType: 'json'
|
|
61
|
+
}
|
|
60
62
|
};
|
|
61
63
|
try {
|
|
62
64
|
const res = yield request_1.default.post(requestOptions);
|
|
@@ -73,7 +75,8 @@ _SpoNavigationNodeAddCommand_instances = new WeakSet(), _SpoNavigationNodeAddCom
|
|
|
73
75
|
Object.assign(this.telemetryProperties, {
|
|
74
76
|
isExternal: args.options.isExternal,
|
|
75
77
|
location: typeof args.options.location !== 'undefined',
|
|
76
|
-
parentNodeId: typeof args.options.parentNodeId !== 'undefined'
|
|
78
|
+
parentNodeId: typeof args.options.parentNodeId !== 'undefined',
|
|
79
|
+
audienceIds: typeof args.options.audienceIds !== 'undefined'
|
|
77
80
|
});
|
|
78
81
|
});
|
|
79
82
|
}, _SpoNavigationNodeAddCommand_initOptions = function _SpoNavigationNodeAddCommand_initOptions() {
|
|
@@ -90,6 +93,8 @@ _SpoNavigationNodeAddCommand_instances = new WeakSet(), _SpoNavigationNodeAddCom
|
|
|
90
93
|
option: '--parentNodeId [parentNodeId]'
|
|
91
94
|
}, {
|
|
92
95
|
option: '--isExternal'
|
|
96
|
+
}, {
|
|
97
|
+
option: '--audienceIds [audienceIds]'
|
|
93
98
|
});
|
|
94
99
|
}, _SpoNavigationNodeAddCommand_initValidators = function _SpoNavigationNodeAddCommand_initValidators() {
|
|
95
100
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -108,6 +113,15 @@ _SpoNavigationNodeAddCommand_instances = new WeakSet(), _SpoNavigationNodeAddCom
|
|
|
108
113
|
return `${args.options.location} is not a valid value for the location option. Allowed values are QuickLaunch|TopNavigationBar`;
|
|
109
114
|
}
|
|
110
115
|
}
|
|
116
|
+
if (args.options.audienceIds) {
|
|
117
|
+
const audienceIdsSplitted = args.options.audienceIds.split(',');
|
|
118
|
+
if (audienceIdsSplitted.length > 10) {
|
|
119
|
+
return 'The maximum amount of audienceIds per navigation node exceeded. The maximum amount of auciendeIds is 10.';
|
|
120
|
+
}
|
|
121
|
+
if (!validation_1.validation.isValidGuidArray(audienceIdsSplitted)) {
|
|
122
|
+
return 'The option audienceIds contains one or more invalid GUIDs';
|
|
123
|
+
}
|
|
124
|
+
}
|
|
111
125
|
return true;
|
|
112
126
|
}));
|
|
113
127
|
}, _SpoNavigationNodeAddCommand_initOptionSets = function _SpoNavigationNodeAddCommand_initOptionSets() {
|
|
@@ -26,6 +26,9 @@ class SpoNavigationNodeListCommand extends SpoCommand_1.default {
|
|
|
26
26
|
get description() {
|
|
27
27
|
return 'Lists nodes from the specified site navigation';
|
|
28
28
|
}
|
|
29
|
+
defaultProperties() {
|
|
30
|
+
return ['Id', 'Title', 'Url'];
|
|
31
|
+
}
|
|
29
32
|
constructor() {
|
|
30
33
|
super();
|
|
31
34
|
_SpoNavigationNodeListCommand_instances.add(this);
|
|
@@ -40,13 +43,7 @@ class SpoNavigationNodeListCommand extends SpoCommand_1.default {
|
|
|
40
43
|
}
|
|
41
44
|
try {
|
|
42
45
|
const res = yield odata_1.odata.getAllItems(`${args.options.webUrl}/_api/web/navigation/${args.options.location.toLowerCase()}`);
|
|
43
|
-
logger.log(res
|
|
44
|
-
return {
|
|
45
|
-
Id: n.Id,
|
|
46
|
-
Title: n.Title,
|
|
47
|
-
Url: n.Url
|
|
48
|
-
};
|
|
49
|
-
}));
|
|
46
|
+
logger.log(res);
|
|
50
47
|
}
|
|
51
48
|
catch (err) {
|
|
52
49
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _SpoNavigationNodeSetCommand_instances, _SpoNavigationNodeSetCommand_initTelemetry, _SpoNavigationNodeSetCommand_initTypes, _SpoNavigationNodeSetCommand_initOptions, _SpoNavigationNodeSetCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
|
+
const commands_1 = require("../../commands");
|
|
22
|
+
class SpoNavigationNodeSetCommand extends SpoCommand_1.default {
|
|
23
|
+
get name() {
|
|
24
|
+
return commands_1.default.NAVIGATION_NODE_SET;
|
|
25
|
+
}
|
|
26
|
+
get description() {
|
|
27
|
+
return 'Adds a navigation node to the specified site navigation';
|
|
28
|
+
}
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
_SpoNavigationNodeSetCommand_instances.add(this);
|
|
32
|
+
__classPrivateFieldGet(this, _SpoNavigationNodeSetCommand_instances, "m", _SpoNavigationNodeSetCommand_initTelemetry).call(this);
|
|
33
|
+
__classPrivateFieldGet(this, _SpoNavigationNodeSetCommand_instances, "m", _SpoNavigationNodeSetCommand_initOptions).call(this);
|
|
34
|
+
__classPrivateFieldGet(this, _SpoNavigationNodeSetCommand_instances, "m", _SpoNavigationNodeSetCommand_initTypes).call(this);
|
|
35
|
+
__classPrivateFieldGet(this, _SpoNavigationNodeSetCommand_instances, "m", _SpoNavigationNodeSetCommand_initValidators).call(this);
|
|
36
|
+
}
|
|
37
|
+
commandAction(logger, args) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
try {
|
|
40
|
+
if (this.verbose) {
|
|
41
|
+
logger.logToStderr(`Setting navigation node...`);
|
|
42
|
+
}
|
|
43
|
+
const requestBody = {
|
|
44
|
+
Title: args.options.title,
|
|
45
|
+
IsExternal: args.options.isExternal,
|
|
46
|
+
Url: args.options.url
|
|
47
|
+
};
|
|
48
|
+
if (args.options.audienceIds !== undefined) {
|
|
49
|
+
requestBody.AudienceIds = args.options.audienceIds === '' ? [] : args.options.audienceIds.split(',');
|
|
50
|
+
}
|
|
51
|
+
const requestOptions = {
|
|
52
|
+
url: `${args.options.webUrl}/_api/web/navigation/GetNodeById(${args.options.id})`,
|
|
53
|
+
headers: {
|
|
54
|
+
accept: 'application/json;odata=nometadata',
|
|
55
|
+
'content-type': 'application/json;odata=nometadata'
|
|
56
|
+
},
|
|
57
|
+
data: requestBody,
|
|
58
|
+
responseType: 'json'
|
|
59
|
+
};
|
|
60
|
+
const response = yield request_1.default.patch(requestOptions);
|
|
61
|
+
if (response['odata.null'] === true) {
|
|
62
|
+
throw `Navigation node does not exist.`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
this.handleRejectedODataJsonPromise(err);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
_SpoNavigationNodeSetCommand_instances = new WeakSet(), _SpoNavigationNodeSetCommand_initTelemetry = function _SpoNavigationNodeSetCommand_initTelemetry() {
|
|
72
|
+
this.telemetry.push((args) => {
|
|
73
|
+
Object.assign(this.telemetryProperties, {
|
|
74
|
+
title: typeof args.options.title !== 'undefined',
|
|
75
|
+
url: typeof args.options.url !== 'undefined',
|
|
76
|
+
isExternal: typeof args.options.isExternal !== 'undefined',
|
|
77
|
+
audienceIds: typeof args.options.audienceIds !== 'undefined'
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}, _SpoNavigationNodeSetCommand_initTypes = function _SpoNavigationNodeSetCommand_initTypes() {
|
|
81
|
+
this.types.boolean.push('isExternal');
|
|
82
|
+
}, _SpoNavigationNodeSetCommand_initOptions = function _SpoNavigationNodeSetCommand_initOptions() {
|
|
83
|
+
this.options.unshift({
|
|
84
|
+
option: '-u, --webUrl <webUrl>'
|
|
85
|
+
}, {
|
|
86
|
+
option: '--id <id>'
|
|
87
|
+
}, {
|
|
88
|
+
option: '--title [title]'
|
|
89
|
+
}, {
|
|
90
|
+
option: '--url [url]'
|
|
91
|
+
}, {
|
|
92
|
+
option: '--audienceIds [audienceIds]'
|
|
93
|
+
}, {
|
|
94
|
+
option: '--isExternal [isExternal]'
|
|
95
|
+
});
|
|
96
|
+
}, _SpoNavigationNodeSetCommand_initValidators = function _SpoNavigationNodeSetCommand_initValidators() {
|
|
97
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
99
|
+
if (isValidSharePointUrl !== true) {
|
|
100
|
+
return isValidSharePointUrl;
|
|
101
|
+
}
|
|
102
|
+
if (args.options.audienceIds === undefined && !args.options.url && args.options.isExternal === undefined && !args.options.title) {
|
|
103
|
+
return `Please specify atleast one property to update.`;
|
|
104
|
+
}
|
|
105
|
+
if (args.options.audienceIds) {
|
|
106
|
+
const audienceIdsSplitted = args.options.audienceIds.split(',');
|
|
107
|
+
if (audienceIdsSplitted.length > 10) {
|
|
108
|
+
return 'The maximum amount of audienceIds per navigation node exceeded. The maximum amount of audienceIds is 10.';
|
|
109
|
+
}
|
|
110
|
+
if (!validation_1.validation.isValidGuidArray(audienceIdsSplitted)) {
|
|
111
|
+
return `The option audienceIds contains one or more invalid GUIDs`;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return true;
|
|
115
|
+
}));
|
|
116
|
+
};
|
|
117
|
+
module.exports = new SpoNavigationNodeSetCommand();
|
|
118
|
+
//# sourceMappingURL=navigation-node-set.js.map
|
|
@@ -62,6 +62,9 @@ class SpoWebSetCommand extends SpoCommand_1.default {
|
|
|
62
62
|
if (typeof args.options.footerEnabled !== 'undefined') {
|
|
63
63
|
payload.FooterEnabled = args.options.footerEnabled;
|
|
64
64
|
}
|
|
65
|
+
if (typeof args.options.navAudienceTargetingEnabled !== 'undefined') {
|
|
66
|
+
payload.NavAudienceTargetingEnabled = args.options.navAudienceTargetingEnabled;
|
|
67
|
+
}
|
|
65
68
|
if (typeof args.options.searchScope !== 'undefined') {
|
|
66
69
|
const searchScope = args.options.searchScope.toLowerCase();
|
|
67
70
|
payload.SearchScope = SpoWebSetCommand.searchScopeOptions.indexOf(searchScope);
|
|
@@ -96,11 +99,12 @@ _SpoWebSetCommand_instances = new WeakSet(), _SpoWebSetCommand_initTelemetry = f
|
|
|
96
99
|
description: typeof args.options.description !== 'undefined',
|
|
97
100
|
headerEmphasis: typeof args.options.headerEmphasis !== 'undefined',
|
|
98
101
|
headerLayout: typeof args.options.headerLayout !== 'undefined',
|
|
99
|
-
megaMenuEnabled: args.options.megaMenuEnabled,
|
|
102
|
+
megaMenuEnabled: typeof args.options.megaMenuEnabled !== 'undefined',
|
|
100
103
|
siteLogoUrl: typeof args.options.siteLogoUrl !== 'undefined',
|
|
101
104
|
title: typeof args.options.title !== 'undefined',
|
|
102
|
-
quickLaunchEnabled: args.options.quickLaunchEnabled,
|
|
103
|
-
footerEnabled: args.options.footerEnabled,
|
|
105
|
+
quickLaunchEnabled: typeof args.options.quickLaunchEnabled !== 'undefined',
|
|
106
|
+
footerEnabled: typeof args.options.footerEnabled !== 'undefined',
|
|
107
|
+
navAudienceTargetingEnabled: typeof args.options.navAudienceTargetingEnabled !== 'undefined',
|
|
104
108
|
searchScope: args.options.searchScope !== 'undefined'
|
|
105
109
|
});
|
|
106
110
|
this.trackUnknownOptions(this.telemetryProperties, args.options);
|
|
@@ -129,12 +133,15 @@ _SpoWebSetCommand_instances = new WeakSet(), _SpoWebSetCommand_initTelemetry = f
|
|
|
129
133
|
}, {
|
|
130
134
|
option: '--footerEnabled [footerEnabled]',
|
|
131
135
|
autocomplete: ['true', 'false']
|
|
136
|
+
}, {
|
|
137
|
+
option: '--navAudienceTargetingEnabled [navAudienceTargetingEnabled]',
|
|
138
|
+
autocomplete: ['true', 'false']
|
|
132
139
|
}, {
|
|
133
140
|
option: '--searchScope [searchScope]',
|
|
134
141
|
autocomplete: SpoWebSetCommand.searchScopeOptions
|
|
135
142
|
});
|
|
136
143
|
}, _SpoWebSetCommand_initTypes = function _SpoWebSetCommand_initTypes() {
|
|
137
|
-
this.types.boolean.push('megaMenuEnabled', 'footerEnabled', 'quickLaunchEnabled');
|
|
144
|
+
this.types.boolean.push('megaMenuEnabled', 'footerEnabled', 'quickLaunchEnabled', 'navAudienceTargetingEnabled');
|
|
138
145
|
}, _SpoWebSetCommand_initValidators = function _SpoWebSetCommand_initValidators() {
|
|
139
146
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
140
147
|
const isValidSharePointUrl = validation_1.validation.isValidSharePointUrl(args.options.url);
|
|
@@ -167,6 +167,7 @@ exports.default = {
|
|
|
167
167
|
NAVIGATION_NODE_ADD: `${prefix} navigation node add`,
|
|
168
168
|
NAVIGATION_NODE_LIST: `${prefix} navigation node list`,
|
|
169
169
|
NAVIGATION_NODE_REMOVE: `${prefix} navigation node remove`,
|
|
170
|
+
NAVIGATION_NODE_SET: `${prefix} navigation node set`,
|
|
170
171
|
ORGASSETSLIBRARY_ADD: `${prefix} orgassetslibrary add`,
|
|
171
172
|
ORGASSETSLIBRARY_LIST: `${prefix} orgassetslibrary list`,
|
|
172
173
|
ORGASSETSLIBRARY_REMOVE: `${prefix} orgassetslibrary remove`,
|
|
@@ -23,6 +23,7 @@ m365 aad app list
|
|
|
23
23
|
## Response
|
|
24
24
|
|
|
25
25
|
=== "JSON"
|
|
26
|
+
|
|
26
27
|
```json
|
|
27
28
|
[
|
|
28
29
|
{
|
|
@@ -136,6 +137,7 @@ m365 aad app list
|
|
|
136
137
|
```
|
|
137
138
|
|
|
138
139
|
=== "Text"
|
|
140
|
+
|
|
139
141
|
```text
|
|
140
142
|
appId id displayName signInAudience
|
|
141
143
|
------------------------------------ ------------------------------------ ----------------------------------------------------------------------- ----------------------------------
|
|
@@ -143,6 +145,7 @@ m365 aad app list
|
|
|
143
145
|
```
|
|
144
146
|
|
|
145
147
|
=== "CSV"
|
|
148
|
+
|
|
146
149
|
```csv
|
|
147
150
|
appId,id,displayName,signInAudience
|
|
148
151
|
61ed4fab-a861-4307-bb87-a6a53dbe39f5,ff2798f7-1c7a-4607-8a7b-3d5e0c18c756,TestAppPermissions,AzureADMyOrg
|
|
@@ -83,6 +83,6 @@ Change password of the currently logged in user
|
|
|
83
83
|
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --currentPassword SLBF5gnRtyYc --newPassword 6NLUId79Lc24
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
## Response
|
|
87
87
|
|
|
88
88
|
The command won't return a response on success.
|
|
@@ -16,6 +16,15 @@ m365 flow run list [options]
|
|
|
16
16
|
`-e, --environmentName <environmentName>`
|
|
17
17
|
: The name of the environment to which the flow belongs
|
|
18
18
|
|
|
19
|
+
`--status [status]`
|
|
20
|
+
: Filter the results to only flow runs with a given status: `Succeeded`, `Running`, `Failed` or `Cancelled`. By default all flow runs are listed.
|
|
21
|
+
|
|
22
|
+
`--triggerStartTime [triggerStartTime]`
|
|
23
|
+
: Time indicating the inclusive start of a time range of flow runs to return. This should be defined as a valid ISO 8601 string (2021-12-16T18:28:48.6964197Z).
|
|
24
|
+
|
|
25
|
+
`--triggerEndTime [triggerEndTime]`
|
|
26
|
+
: Time indicating the exclusive end of a time range of flow runs to return. This should be defined as a valid ISO 8601 string (2021-12-16T18:28:48.6964197Z).
|
|
27
|
+
|
|
19
28
|
--8<-- "docs/cmd/_global.md"
|
|
20
29
|
|
|
21
30
|
## Remarks
|
|
@@ -35,6 +44,18 @@ List runs of the specified Microsoft Flow
|
|
|
35
44
|
m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a
|
|
36
45
|
```
|
|
37
46
|
|
|
47
|
+
List runs of the specified Microsoft Flow with a specific status
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --status Running
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
List runs of the specified Microsoft Flow between a specific time range
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --triggerStartTime 2023-01-21T18:19:00Z --triggerEndTime 2023-01-22T00:00:00Z
|
|
57
|
+
```
|
|
58
|
+
|
|
38
59
|
## Response
|
|
39
60
|
|
|
40
61
|
### Standard response
|
|
@@ -27,6 +27,10 @@ m365 planner plan remove [options]
|
|
|
27
27
|
|
|
28
28
|
--8<-- "docs/cmd/_global.md"
|
|
29
29
|
|
|
30
|
+
## Remarks
|
|
31
|
+
|
|
32
|
+
If you wish to delete a Planner plan contained within a Planner Roster, you'll have to remove the roster using [planner roster remove](../roster/roster-remove.md).
|
|
33
|
+
|
|
30
34
|
## Examples
|
|
31
35
|
|
|
32
36
|
Removes the Microsoft Planner plan by ID
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# planner roster add
|
|
2
|
+
|
|
3
|
+
Creates a new Microsoft Planner Roster
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 planner roster add [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
--8<-- "docs/cmd/_global.md"
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
!!! attention
|
|
18
|
+
The Roster will be automatically deleted when it doesn't contain a plan 24 hours after its creation. Membership information will be completely erased within 30 days of this deletion.
|
|
19
|
+
|
|
20
|
+
!!! attention
|
|
21
|
+
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
22
|
+
|
|
23
|
+
!!! important
|
|
24
|
+
To be able to create a new Roster, the Planner Roster creation tenant setting should be enabled. Use the [planner tenant settings list](../tenant/tenant-settings-list.md) command to check if this setting is enabled for your tenant.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
Creates a new Microsoft Planner Roster
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
m365 planner roster add
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Response
|
|
35
|
+
|
|
36
|
+
=== "JSON"
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"id": "e6fmvM_yi0OJgvmepE5uj5cAE6qX",
|
|
41
|
+
"assignedSensitivityLabel": null
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
=== "Text"
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
assignedSensitivityLabel: null
|
|
49
|
+
id : e6fmvM_yi0OJgvmepE5uj5cAE6qX
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
=== "CSV"
|
|
53
|
+
|
|
54
|
+
```csv
|
|
55
|
+
id,assignedSensitivityLabel
|
|
56
|
+
e6fmvM_yi0OJgvmepE5uj5cAE6qX,
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Additional information
|
|
60
|
+
Rosters are a new type of container for Microsoft Planner plans. This enables users to create a Planner plan without the need to create a new Microsoft 365 group (with a mailbox, SharePoint site, ...). Access to Roster-contained plans is controlled by the members on the Roster. A Planner Roster can contain only 1 plan.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# planner roster remove
|
|
2
|
+
|
|
3
|
+
Removes a Microsoft Planner Roster
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 planner roster remove [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--id <id>`
|
|
14
|
+
: ID of the Planner Roster.
|
|
15
|
+
|
|
16
|
+
`--confirm`
|
|
17
|
+
: Don't prompt for confirmation.
|
|
18
|
+
|
|
19
|
+
--8<-- "docs/cmd/_global.md"
|
|
20
|
+
|
|
21
|
+
## Remarks
|
|
22
|
+
|
|
23
|
+
!!! attention
|
|
24
|
+
Deleting a Planner Roster will also delete the plan within the Roster.
|
|
25
|
+
|
|
26
|
+
!!! attention
|
|
27
|
+
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
Removes a Planner Roster
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
m365 planner roster remove --id tYqYlNd6eECmsNhN_fcq85cAGAnd
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Removes a Planner Roster without confirmation prompt
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
m365 planner roster remove --id tYqYlNd6eECmsNhN_fcq85cAGAnd --confirm
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Response
|
|
44
|
+
|
|
45
|
+
The command won't return a response on success.
|
|
46
|
+
|
|
47
|
+
## Additional information
|
|
48
|
+
Rosters are a new type of container for Microsoft Planner plans. This enables users to create a Planner plan without the need to create a new Microsoft 365 group (with a mailbox, SharePoint site, ...). Access to Roster-contained plans is controlled by the members on the Roster. A Planner Roster can contain only 1 plan.
|
|
@@ -14,10 +14,10 @@ m365 spo listitem attachment list [options]
|
|
|
14
14
|
URL of the site from which the item should be retrieved
|
|
15
15
|
|
|
16
16
|
`--listId [listId]`
|
|
17
|
-
: ID of the list where the item should be
|
|
17
|
+
: ID of the list where the item should be retrieved. Specify either `listTitle`, `listId` or `listUrl`
|
|
18
18
|
|
|
19
19
|
`--listTitle [listTitle]`
|
|
20
|
-
: Title of the list where the item should be
|
|
20
|
+
: Title of the list where the item should be retrieved. Specify either `listTitle`, `listId` or `listUrl`
|
|
21
21
|
|
|
22
22
|
`--listUrl [listUrl]`
|
|
23
23
|
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`
|
|
@@ -17,10 +17,10 @@ m365 spo listitem isrecord [options]
|
|
|
17
17
|
: The ID of the list item to check if it is a record
|
|
18
18
|
|
|
19
19
|
`-l, --listId [listId]`
|
|
20
|
-
: ID of the list where the item should be
|
|
20
|
+
: ID of the list where the item should be checked. Specify either `listTitle`, `listId` or `listUrl`
|
|
21
21
|
|
|
22
22
|
`-t, --listTitle [listTitle]`
|
|
23
|
-
: Title of the list where the item should be
|
|
23
|
+
: Title of the list where the item should be checked. Specify either `listTitle`, `listId` or `listUrl`
|
|
24
24
|
|
|
25
25
|
`--listUrl [listUrl]`
|
|
26
26
|
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId` or `listUrl`
|
|
@@ -28,8 +28,15 @@ m365 spo navigation node add [options]
|
|
|
28
28
|
`--isExternal`
|
|
29
29
|
: Set, if the navigation node points to an external URL.
|
|
30
30
|
|
|
31
|
+
`--audienceIds [audienceIds]`
|
|
32
|
+
: Comma separated list of group IDs that will be used for audience targeting. The limit is 10 ids per navigation node.
|
|
33
|
+
|
|
31
34
|
--8<-- "docs/cmd/_global.md"
|
|
32
35
|
|
|
36
|
+
## Remarks
|
|
37
|
+
|
|
38
|
+
In order to use option `audienceIds`, make sure that audience targeted navigation is enabled using command [spo web set](../web/web-set.md).
|
|
39
|
+
|
|
33
40
|
## Examples
|
|
34
41
|
|
|
35
42
|
Add a navigation node pointing to a SharePoint page to the top navigation
|
|
@@ -50,13 +57,21 @@ Add a navigation node below an existing node
|
|
|
50
57
|
m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --parentNodeId 2010 --title About --url /sites/team-s/sitepages/about.aspx
|
|
51
58
|
```
|
|
52
59
|
|
|
60
|
+
Add a navigation node to the top navigation which is audience targetted
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location TopNavigationBar --title About --url /sites/team-s/sitepages/about.aspx --audienceIds "7aa4a1ca-4035-4f2f-bac7-7beada59b5ba,4bbf236f-a131-4019-b4a2-315902fcfa3a"
|
|
64
|
+
```
|
|
65
|
+
|
|
53
66
|
## Response
|
|
54
67
|
|
|
55
68
|
=== "JSON"
|
|
56
69
|
|
|
57
70
|
```json
|
|
58
71
|
{
|
|
59
|
-
"AudienceIds":
|
|
72
|
+
"AudienceIds": [
|
|
73
|
+
"7aa4a1ca-4035-4f2f-bac7-7beada59b5ba"
|
|
74
|
+
],
|
|
60
75
|
"CurrentLCID": 1033,
|
|
61
76
|
"Id": 2030,
|
|
62
77
|
"IsDocLib": true,
|
|
@@ -71,7 +86,7 @@ m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-
|
|
|
71
86
|
=== "Text"
|
|
72
87
|
|
|
73
88
|
```text
|
|
74
|
-
AudienceIds :
|
|
89
|
+
AudienceIds : ["7aa4a1ca-4035-4f2f-bac7-7beada59b5ba"]
|
|
75
90
|
CurrentLCID : 1033
|
|
76
91
|
Id : 2031
|
|
77
92
|
IsDocLib : true
|
|
@@ -86,5 +101,5 @@ m365 spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-
|
|
|
86
101
|
|
|
87
102
|
```csv
|
|
88
103
|
AudienceIds,CurrentLCID,Id,IsDocLib,IsExternal,IsVisible,ListTemplateType,Title,Url
|
|
89
|
-
,1033,2032,1,1,1,0,Navigation Link,https://contoso.sharepoint.com
|
|
104
|
+
"[""7aa4a1ca-4035-4f2f-bac7-7beada59b5ba""]",1033,2032,1,1,1,0,Navigation Link,https://contoso.sharepoint.com
|
|
90
105
|
```
|
|
@@ -39,7 +39,15 @@ m365 spo navigation node list --webUrl https://contoso.sharepoint.com/sites/team
|
|
|
39
39
|
```json
|
|
40
40
|
[
|
|
41
41
|
{
|
|
42
|
+
"AudienceIds": [
|
|
43
|
+
"5786b8e8-c495-4734-b345-756733960730"
|
|
44
|
+
],
|
|
45
|
+
"CurrentLCID": 1033,
|
|
42
46
|
"Id": 2032,
|
|
47
|
+
"IsDocLib": true,
|
|
48
|
+
"IsExternal": true,
|
|
49
|
+
"IsVisible": true,
|
|
50
|
+
"ListTemplateType": 0,
|
|
43
51
|
"Title": "Navigation Link",
|
|
44
52
|
"Url": "https://contoso.sharepoint.com"
|
|
45
53
|
}
|
|
@@ -60,3 +68,25 @@ m365 spo navigation node list --webUrl https://contoso.sharepoint.com/sites/team
|
|
|
60
68
|
Id,Title,Url
|
|
61
69
|
2032,Navigation Link,https://contoso.sharepoint.com
|
|
62
70
|
```
|
|
71
|
+
|
|
72
|
+
=== "Markdown"
|
|
73
|
+
|
|
74
|
+
```md
|
|
75
|
+
# spo navigation node list --webUrl "https://contoso.sharepoint.com" --location "QuickLaunch"
|
|
76
|
+
|
|
77
|
+
Date: 27/1/2023
|
|
78
|
+
|
|
79
|
+
## Home (1031)
|
|
80
|
+
|
|
81
|
+
Property | Value
|
|
82
|
+
---------|-------
|
|
83
|
+
AudienceIds | ["5786b8e8-c495-4734-b345-756733960730"]
|
|
84
|
+
CurrentLCID | 1033
|
|
85
|
+
Id | 2032
|
|
86
|
+
IsDocLib | true
|
|
87
|
+
IsExternal | false
|
|
88
|
+
IsVisible | true
|
|
89
|
+
ListTemplateType | 0
|
|
90
|
+
Title | Navigation Link
|
|
91
|
+
Url | https://contoso.sharepoint.com
|
|
92
|
+
```
|
|
@@ -14,7 +14,7 @@ m365 spo navigation node remove [options]
|
|
|
14
14
|
: Absolute URL of the site to which navigation should be modified
|
|
15
15
|
|
|
16
16
|
`-l, --location <location>`
|
|
17
|
-
: Navigation type where the node should be
|
|
17
|
+
: Navigation type where the node should be removed. Available options: `QuickLaunch,TopNavigationBar`
|
|
18
18
|
|
|
19
19
|
`-i, --id <id>`
|
|
20
20
|
: ID of the node to remove
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# spo navigation node set
|
|
2
|
+
|
|
3
|
+
Updates a SharePoint navigation node
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo navigation node set [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-u, --webUrl <webUrl>`
|
|
14
|
+
: Absolute URL of the site.
|
|
15
|
+
|
|
16
|
+
`--id <id>`
|
|
17
|
+
: Id of the navigation node.
|
|
18
|
+
|
|
19
|
+
`--title [title]`
|
|
20
|
+
: New title of the navigation node.
|
|
21
|
+
|
|
22
|
+
`--url [url]`
|
|
23
|
+
: New URL of the navigation node.
|
|
24
|
+
|
|
25
|
+
`--audienceIds [audienceIds]`
|
|
26
|
+
: Comma separated list of group IDs that will be used for audience targeting. Speficy an empty string `""` to clear this value. The limit is 10 ids per navigation node.
|
|
27
|
+
|
|
28
|
+
`--isExternal [isExternal]`
|
|
29
|
+
: Whether the navigation node points to an external URL. Valid values: `true` or `false`.
|
|
30
|
+
|
|
31
|
+
--8<-- "docs/cmd/_global.md"
|
|
32
|
+
|
|
33
|
+
## Remarks
|
|
34
|
+
|
|
35
|
+
To enable/disable audience targeting for the nsavigation bar, use command [`spo web set`](../web/web-set.md).
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
Updates the title of a navigation node
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
m365 spo navigation node set --webUrl https://contoso.sharepoint.com/sites/marketing --id 2209 --title "Pictures"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Updates the URL of a navigation node
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
m365 spo navigation node set --webUrl https://contoso.sharepoint.com/sites/marketing --id 2209 --url "https://www.microsoft.com" --isExternal true
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Updates audience targeting of a navigation node with 3 groups
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
m365 spo navigation node set --webUrl https://contoso.sharepoint.com/sites/marketing --id 2209 --audienceIds "61f78c73-f71a-471e-a3b9-15daa936e200,9524e6b4-e663-44fe-b179-210c963e37e7,c42b8756-494d-4141-a575-45f01320e26a"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Response
|
|
58
|
+
|
|
59
|
+
The command won't return a response on success.
|
|
@@ -37,6 +37,9 @@ m365 spo web set [options]
|
|
|
37
37
|
`--footerEnabled [footerEnabled]`
|
|
38
38
|
: Set to `true` to enable footer and to `false` to disable it
|
|
39
39
|
|
|
40
|
+
`--navAudienceTargetingEnabled [navAudienceTargetingEnabled]`
|
|
41
|
+
: Enable or disable site navigation audience targeting. Allowed values: `true` or `false`.
|
|
42
|
+
|
|
40
43
|
`--searchScope [searchScope]`
|
|
41
44
|
: Search scope to set in the site. Allowed values `DefaultScope,Tenant,Hub,Site`
|
|
42
45
|
|
|
@@ -87,6 +90,12 @@ Hide footer in the site
|
|
|
87
90
|
m365 spo web set --url https://contoso.sharepoint.com/sites/team-a --footerEnabled false
|
|
88
91
|
```
|
|
89
92
|
|
|
93
|
+
Enable navigation audience targetting in the site
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
m365 spo web set --url https://contoso.sharepoint.com/sites/team-a --navAudienceTargetingEnabled true
|
|
97
|
+
```
|
|
98
|
+
|
|
90
99
|
Set search scope to tenant scope
|
|
91
100
|
|
|
92
101
|
```sh
|
package/package.json
CHANGED