@pnp/cli-microsoft365 10.2.0-beta.9e186e5 → 10.2.0-beta.a15ecbf
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/README.md +3 -3
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/spe/commands/container/container-get.js +49 -0
- package/dist/m365/spe/commands.js +1 -0
- package/dist/m365/spo/commands/page/page-section-add.js +8 -4
- package/dist/m365/spo/commands/tenant/tenant-homesite-list.js +37 -0
- package/dist/m365/spo/commands/user/user-ensure.js +43 -10
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/spp/commands/model/model-get.js +108 -0
- package/dist/m365/spp/commands.js +1 -0
- package/docs/docs/cmd/spe/container/container-get.mdx +92 -0
- package/docs/docs/cmd/spo/page/page-section-add.mdx +10 -1
- package/docs/docs/cmd/spo/tenant/tenant-homesite-list.mdx +95 -0
- package/docs/docs/cmd/spo/user/user-ensure.mdx +32 -6
- package/docs/docs/cmd/spp/model/model-get.mdx +464 -0
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
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");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _SpeContainerGetCommand_instances, _SpeContainerGetCommand_initOptions, _SpeContainerGetCommand_initTypes;
|
|
7
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
import request from '../../../../request.js';
|
|
10
|
+
class SpeContainerGetCommand extends GraphCommand {
|
|
11
|
+
get name() {
|
|
12
|
+
return commands.CONTAINER_GET;
|
|
13
|
+
}
|
|
14
|
+
get description() {
|
|
15
|
+
return 'Gets a container of a specific container type';
|
|
16
|
+
}
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
_SpeContainerGetCommand_instances.add(this);
|
|
20
|
+
__classPrivateFieldGet(this, _SpeContainerGetCommand_instances, "m", _SpeContainerGetCommand_initOptions).call(this);
|
|
21
|
+
__classPrivateFieldGet(this, _SpeContainerGetCommand_instances, "m", _SpeContainerGetCommand_initTypes).call(this);
|
|
22
|
+
}
|
|
23
|
+
async commandAction(logger, args) {
|
|
24
|
+
if (this.verbose) {
|
|
25
|
+
await logger.logToStderr(`Getting a container with id '${args.options.id}'...`);
|
|
26
|
+
}
|
|
27
|
+
const requestOptions = {
|
|
28
|
+
url: `${this.resource}/v1.0/storage/fileStorage/containers/${args.options.id}`,
|
|
29
|
+
headers: {
|
|
30
|
+
accept: 'application/json;odata.metadata=none'
|
|
31
|
+
},
|
|
32
|
+
responseType: 'json'
|
|
33
|
+
};
|
|
34
|
+
try {
|
|
35
|
+
const res = await request.get(requestOptions);
|
|
36
|
+
await logger.log(res);
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
this.handleRejectedODataJsonPromise(err);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
_SpeContainerGetCommand_instances = new WeakSet(), _SpeContainerGetCommand_initOptions = function _SpeContainerGetCommand_initOptions() {
|
|
44
|
+
this.options.unshift({ option: '-i, --id <id>' });
|
|
45
|
+
}, _SpeContainerGetCommand_initTypes = function _SpeContainerGetCommand_initTypes() {
|
|
46
|
+
this.types.string.push('id');
|
|
47
|
+
};
|
|
48
|
+
export default new SpeContainerGetCommand();
|
|
49
|
+
//# sourceMappingURL=container-get.js.map
|
|
@@ -159,7 +159,7 @@ class SpoPageSectionAddCommand extends SpoCommand {
|
|
|
159
159
|
return columns;
|
|
160
160
|
}
|
|
161
161
|
getColumn(zoneIndex, sectionIndex, sectionFactor, args, zoneId) {
|
|
162
|
-
const { zoneEmphasis, isCollapsibleSection, isExpanded, showDivider, iconAlignment } = args.options;
|
|
162
|
+
const { zoneEmphasis, isCollapsibleSection, isExpanded, showDivider, iconAlignment, collapsibleTitle } = args.options;
|
|
163
163
|
const columnValue = {
|
|
164
164
|
displayMode: 2,
|
|
165
165
|
position: {
|
|
@@ -181,7 +181,8 @@ class SpoPageSectionAddCommand extends SpoCommand {
|
|
|
181
181
|
type: 1,
|
|
182
182
|
isExpanded: !!isExpanded,
|
|
183
183
|
showDividerLine: !!showDivider,
|
|
184
|
-
iconAlignment: iconAlignment && iconAlignment.toLocaleLowerCase() === "right" ? "right" : "left"
|
|
184
|
+
iconAlignment: iconAlignment && iconAlignment.toLocaleLowerCase() === "right" ? "right" : "left",
|
|
185
|
+
displayName: collapsibleTitle
|
|
185
186
|
};
|
|
186
187
|
}
|
|
187
188
|
return columnValue;
|
|
@@ -263,7 +264,8 @@ _SpoPageSectionAddCommand_instances = new WeakSet(), _SpoPageSectionAddCommand_i
|
|
|
263
264
|
fillMode: typeof args.options.fillMode !== 'undefined',
|
|
264
265
|
useLightText: !!args.options.useLightText,
|
|
265
266
|
overlayColor: typeof args.options.overlayColor !== 'undefined',
|
|
266
|
-
overlayOpacity: typeof args.options.overlayOpacity !== 'undefined'
|
|
267
|
+
overlayOpacity: typeof args.options.overlayOpacity !== 'undefined',
|
|
268
|
+
collapsibleTitle: typeof args.options.collapsibleTitle !== 'undefined'
|
|
267
269
|
});
|
|
268
270
|
});
|
|
269
271
|
}, _SpoPageSectionAddCommand_initOptions = function _SpoPageSectionAddCommand_initOptions() {
|
|
@@ -307,6 +309,8 @@ _SpoPageSectionAddCommand_instances = new WeakSet(), _SpoPageSectionAddCommand_i
|
|
|
307
309
|
option: '--overlayColor [overlayColor]'
|
|
308
310
|
}, {
|
|
309
311
|
option: '--overlayOpacity [overlayOpacity]'
|
|
312
|
+
}, {
|
|
313
|
+
option: '--collapsibleTitle [collapsibleTitle]'
|
|
310
314
|
});
|
|
311
315
|
}, _SpoPageSectionAddCommand_initValidators = function _SpoPageSectionAddCommand_initValidators() {
|
|
312
316
|
this.validators.push(async (args) => {
|
|
@@ -363,7 +367,7 @@ _SpoPageSectionAddCommand_instances = new WeakSet(), _SpoPageSectionAddCommand_i
|
|
|
363
367
|
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
364
368
|
});
|
|
365
369
|
}, _SpoPageSectionAddCommand_initTypes = function _SpoPageSectionAddCommand_initTypes() {
|
|
366
|
-
this.types.string = ['pageName', 'webUrl', 'sectionTemplate', 'zoneEmphasis', 'iconAlignment', 'gradientText', 'imageUrl', 'fillMode', 'overlayColor'];
|
|
370
|
+
this.types.string = ['pageName', 'webUrl', 'sectionTemplate', 'zoneEmphasis', 'iconAlignment', 'gradientText', 'imageUrl', 'fillMode', 'overlayColor', 'collapsibleTitle'];
|
|
367
371
|
this.types.boolean = ['isLayoutReflowOnTop', 'isCollapsibleSection', 'showDivider', 'isExpanded', 'useLightText'];
|
|
368
372
|
};
|
|
369
373
|
export default new SpoPageSectionAddCommand();
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { odata } from '../../../../utils/odata.js';
|
|
2
|
+
import { spo } from '../../../../utils/spo.js';
|
|
3
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
4
|
+
import commands from '../../commands.js';
|
|
5
|
+
class SpoTenantHomeSiteListCommand extends SpoCommand {
|
|
6
|
+
get name() {
|
|
7
|
+
return commands.TENANT_HOMESITE_LIST;
|
|
8
|
+
}
|
|
9
|
+
get description() {
|
|
10
|
+
return 'Lists all home sites';
|
|
11
|
+
}
|
|
12
|
+
defaultProperties() {
|
|
13
|
+
return ['Url', 'Title'];
|
|
14
|
+
}
|
|
15
|
+
async commandAction(logger) {
|
|
16
|
+
try {
|
|
17
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.verbose);
|
|
18
|
+
const requestOptions = {
|
|
19
|
+
url: `${spoAdminUrl}/_api/SPO.Tenant/GetTargetedSitesDetails`,
|
|
20
|
+
headers: {
|
|
21
|
+
accept: 'application/json;odata=nometadata'
|
|
22
|
+
},
|
|
23
|
+
responseType: 'json'
|
|
24
|
+
};
|
|
25
|
+
if (this.verbose) {
|
|
26
|
+
await logger.logToStderr(`Retrieving all home sites...`);
|
|
27
|
+
}
|
|
28
|
+
const res = await odata.getAllItems(requestOptions);
|
|
29
|
+
await logger.log(res);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
this.handleRejectedODataJsonPromise(err);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export default new SpoTenantHomeSiteListCommand();
|
|
37
|
+
//# sourceMappingURL=tenant-homesite-list.js.map
|
|
@@ -3,12 +3,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
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");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoUserEnsureCommand_instances, _SpoUserEnsureCommand_initTelemetry, _SpoUserEnsureCommand_initOptions, _SpoUserEnsureCommand_initValidators, _SpoUserEnsureCommand_initOptionSets;
|
|
6
|
+
var _SpoUserEnsureCommand_instances, _SpoUserEnsureCommand_initTelemetry, _SpoUserEnsureCommand_initOptions, _SpoUserEnsureCommand_initValidators, _SpoUserEnsureCommand_initOptionSets, _SpoUserEnsureCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import {
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
12
13
|
class SpoUserEnsureCommand extends SpoCommand {
|
|
13
14
|
get name() {
|
|
14
15
|
return commands.USER_ENSURE;
|
|
@@ -23,14 +24,15 @@ class SpoUserEnsureCommand extends SpoCommand {
|
|
|
23
24
|
__classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initOptions).call(this);
|
|
24
25
|
__classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initValidators).call(this);
|
|
25
26
|
__classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initOptionSets).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoUserEnsureCommand_instances, "m", _SpoUserEnsureCommand_initTypes).call(this);
|
|
26
28
|
}
|
|
27
29
|
async commandAction(logger, args) {
|
|
28
30
|
if (this.verbose) {
|
|
29
|
-
await logger.logToStderr(`Ensuring user ${args.options.entraId || args.options.userName} at site ${args.options.webUrl}`);
|
|
31
|
+
await logger.logToStderr(`Ensuring user ${args.options.entraId || args.options.userName || args.options.loginName || args.options.entraGroupId || args.options.entraGroupName} at site ${args.options.webUrl}`);
|
|
30
32
|
}
|
|
31
33
|
try {
|
|
32
34
|
const requestBody = {
|
|
33
|
-
logonName:
|
|
35
|
+
logonName: await this.getUpn(args.options)
|
|
34
36
|
};
|
|
35
37
|
const requestOptions = {
|
|
36
38
|
url: `${args.options.webUrl}/_api/web/ensureuser`,
|
|
@@ -47,18 +49,38 @@ class SpoUserEnsureCommand extends SpoCommand {
|
|
|
47
49
|
this.handleRejectedODataJsonPromise(err);
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
async
|
|
51
|
-
if (
|
|
52
|
-
|
|
52
|
+
async getUpn(options) {
|
|
53
|
+
if (options.userName) {
|
|
54
|
+
return options.userName;
|
|
55
|
+
}
|
|
56
|
+
if (options.entraId) {
|
|
57
|
+
return entraUser.getUpnByUserId(options.entraId);
|
|
58
|
+
}
|
|
59
|
+
if (options.loginName) {
|
|
60
|
+
return options.loginName;
|
|
61
|
+
}
|
|
62
|
+
let upn = '';
|
|
63
|
+
if (options.entraGroupId || options.entraGroupName) {
|
|
64
|
+
const entraGroup = await this.getEntraGroup(options.entraGroupId, options.entraGroupName);
|
|
65
|
+
upn = entraGroup.mailEnabled ? `c:0o.c|federateddirectoryclaimprovider|${entraGroup.id}` : `c:0t.c|tenant|${entraGroup.id}`;
|
|
53
66
|
}
|
|
54
|
-
return
|
|
67
|
+
return upn;
|
|
68
|
+
}
|
|
69
|
+
async getEntraGroup(entraGroupId, entraGroupName) {
|
|
70
|
+
if (entraGroupId) {
|
|
71
|
+
return entraGroup.getGroupById(entraGroupId);
|
|
72
|
+
}
|
|
73
|
+
return entraGroup.getGroupByDisplayName(entraGroupName);
|
|
55
74
|
}
|
|
56
75
|
}
|
|
57
76
|
_SpoUserEnsureCommand_instances = new WeakSet(), _SpoUserEnsureCommand_initTelemetry = function _SpoUserEnsureCommand_initTelemetry() {
|
|
58
77
|
this.telemetry.push((args) => {
|
|
59
78
|
Object.assign(this.telemetryProperties, {
|
|
60
79
|
entraId: typeof args.options.entraId !== 'undefined',
|
|
61
|
-
userName: typeof args.options.userName !== 'undefined'
|
|
80
|
+
userName: typeof args.options.userName !== 'undefined',
|
|
81
|
+
loginName: typeof args.options.loginName !== 'undefined',
|
|
82
|
+
entraGroupId: typeof args.options.entraGroupId !== 'undefined',
|
|
83
|
+
entraGroupName: typeof args.options.entraGroupName !== 'undefined'
|
|
62
84
|
});
|
|
63
85
|
});
|
|
64
86
|
}, _SpoUserEnsureCommand_initOptions = function _SpoUserEnsureCommand_initOptions() {
|
|
@@ -68,6 +90,12 @@ _SpoUserEnsureCommand_instances = new WeakSet(), _SpoUserEnsureCommand_initTelem
|
|
|
68
90
|
option: '--entraId [entraId]'
|
|
69
91
|
}, {
|
|
70
92
|
option: '--userName [userName]'
|
|
93
|
+
}, {
|
|
94
|
+
option: '--loginName [loginName]'
|
|
95
|
+
}, {
|
|
96
|
+
option: '--entraGroupId [entraGroupId]'
|
|
97
|
+
}, {
|
|
98
|
+
option: '--entraGroupName [entraGroupName]'
|
|
71
99
|
});
|
|
72
100
|
}, _SpoUserEnsureCommand_initValidators = function _SpoUserEnsureCommand_initValidators() {
|
|
73
101
|
this.validators.push(async (args) => {
|
|
@@ -81,10 +109,15 @@ _SpoUserEnsureCommand_instances = new WeakSet(), _SpoUserEnsureCommand_initTelem
|
|
|
81
109
|
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
82
110
|
return `${args.options.userName} is not a valid userName.`;
|
|
83
111
|
}
|
|
112
|
+
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
113
|
+
return `${args.options.entraGroupId} is not a valid GUID for option 'entraGroupId'.`;
|
|
114
|
+
}
|
|
84
115
|
return true;
|
|
85
116
|
});
|
|
86
117
|
}, _SpoUserEnsureCommand_initOptionSets = function _SpoUserEnsureCommand_initOptionSets() {
|
|
87
|
-
this.optionSets.push({ options: ['entraId', 'userName'] });
|
|
118
|
+
this.optionSets.push({ options: ['entraId', 'userName', 'loginName', 'entraGroupId', 'entraGroupName'] });
|
|
119
|
+
}, _SpoUserEnsureCommand_initTypes = function _SpoUserEnsureCommand_initTypes() {
|
|
120
|
+
this.types.string.push('webUrl', 'entraId', 'userName', 'loginName', 'entraGroupId', 'entraGroupName');
|
|
88
121
|
};
|
|
89
122
|
export default new SpoUserEnsureCommand();
|
|
90
123
|
//# sourceMappingURL=user-ensure.js.map
|
|
@@ -317,6 +317,7 @@ export default {
|
|
|
317
317
|
TENANT_COMMANDSET_LIST: `${prefix} tenant commandset list`,
|
|
318
318
|
TENANT_COMMANDSET_REMOVE: `${prefix} tenant commandset remove`,
|
|
319
319
|
TENANT_COMMANDSET_SET: `${prefix} tenant commandset set`,
|
|
320
|
+
TENANT_HOMESITE_LIST: `${prefix} tenant homesite list`,
|
|
320
321
|
TENANT_RECYCLEBINITEM_LIST: `${prefix} tenant recyclebinitem list`,
|
|
321
322
|
TENANT_RECYCLEBINITEM_REMOVE: `${prefix} tenant recyclebinitem remove`,
|
|
322
323
|
TENANT_RECYCLEBINITEM_RESTORE: `${prefix} tenant recyclebinitem restore`,
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
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");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _SppModelGetCommand_instances, _SppModelGetCommand_initTelemetry, _SppModelGetCommand_initOptions, _SppModelGetCommand_initValidators, _SppModelGetCommand_initOptionSets, _SppModelGetCommand_initTypes;
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { odata } from '../../../../utils/odata.js';
|
|
10
|
+
import { spp } from '../../../../utils/spp.js';
|
|
11
|
+
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
12
|
+
import { validation } from '../../../../utils/validation.js';
|
|
13
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
14
|
+
import commands from '../../commands.js';
|
|
15
|
+
class SppModelGetCommand extends SpoCommand {
|
|
16
|
+
get name() {
|
|
17
|
+
return commands.MODEL_GET;
|
|
18
|
+
}
|
|
19
|
+
get description() {
|
|
20
|
+
return 'Retrieves information about a document understanding model';
|
|
21
|
+
}
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
_SppModelGetCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initValidators).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initOptionSets).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SppModelGetCommand_instances, "m", _SppModelGetCommand_initTypes).call(this);
|
|
30
|
+
}
|
|
31
|
+
async commandAction(logger, args) {
|
|
32
|
+
try {
|
|
33
|
+
if (this.verbose) {
|
|
34
|
+
await logger.log(`Retrieving model information from ${args.options.siteUrl}...`);
|
|
35
|
+
}
|
|
36
|
+
const siteUrl = urlUtil.removeTrailingSlashes(args.options.siteUrl);
|
|
37
|
+
await spp.assertSiteIsContentCenter(siteUrl);
|
|
38
|
+
let requestUrl = `${siteUrl}/_api/machinelearning/models/`;
|
|
39
|
+
if (args.options.title) {
|
|
40
|
+
let requestTitle = args.options.title.toLowerCase();
|
|
41
|
+
if (!requestTitle.endsWith('.classifier')) {
|
|
42
|
+
requestTitle += '.classifier';
|
|
43
|
+
}
|
|
44
|
+
requestUrl += `getbytitle('${formatting.encodeQueryParameter(requestTitle)}')`;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
requestUrl += `getbyuniqueid('${args.options.id}')`;
|
|
48
|
+
}
|
|
49
|
+
const requestOptions = {
|
|
50
|
+
url: requestUrl,
|
|
51
|
+
headers: {
|
|
52
|
+
accept: 'application/json;odata=nometadata'
|
|
53
|
+
},
|
|
54
|
+
responseType: 'json'
|
|
55
|
+
};
|
|
56
|
+
const result = await request.get(requestOptions);
|
|
57
|
+
if (result['odata.null'] === true) {
|
|
58
|
+
throw 'Model not found.';
|
|
59
|
+
}
|
|
60
|
+
if (args.options.withPublications) {
|
|
61
|
+
result.Publications = await odata.getAllItems(`${siteUrl}/_api/machinelearning/publications/getbymodeluniqueid('${result.UniqueId}')`);
|
|
62
|
+
}
|
|
63
|
+
await logger.log({
|
|
64
|
+
...result,
|
|
65
|
+
ConfidenceScore: result.ConfidenceScore ? JSON.parse(result.ConfidenceScore) : null,
|
|
66
|
+
Explanations: result.Explanations ? JSON.parse(result.Explanations) : null,
|
|
67
|
+
Schemas: result.Schemas ? JSON.parse(result.Schemas) : null,
|
|
68
|
+
ModelSettings: result.ModelSettings ? JSON.parse(result.ModelSettings) : null
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
this.handleRejectedODataJsonPromise(err);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
_SppModelGetCommand_instances = new WeakSet(), _SppModelGetCommand_initTelemetry = function _SppModelGetCommand_initTelemetry() {
|
|
77
|
+
this.telemetry.push((args) => {
|
|
78
|
+
Object.assign(this.telemetryProperties, {
|
|
79
|
+
id: typeof args.options.id !== 'undefined',
|
|
80
|
+
title: typeof args.options.title !== 'undefined',
|
|
81
|
+
withPublications: !!args.options.withPublications
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}, _SppModelGetCommand_initOptions = function _SppModelGetCommand_initOptions() {
|
|
85
|
+
this.options.unshift({
|
|
86
|
+
option: '-u, --siteUrl <siteUrl>'
|
|
87
|
+
}, {
|
|
88
|
+
option: '-i, --id [id]'
|
|
89
|
+
}, {
|
|
90
|
+
option: '-t, --title [title]'
|
|
91
|
+
}, {
|
|
92
|
+
option: '--withPublications'
|
|
93
|
+
});
|
|
94
|
+
}, _SppModelGetCommand_initValidators = function _SppModelGetCommand_initValidators() {
|
|
95
|
+
this.validators.push(async (args) => {
|
|
96
|
+
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
97
|
+
return `${args.options.id} is not a valid GUID for option 'id'.`;
|
|
98
|
+
}
|
|
99
|
+
return validation.isValidSharePointUrl(args.options.siteUrl);
|
|
100
|
+
});
|
|
101
|
+
}, _SppModelGetCommand_initOptionSets = function _SppModelGetCommand_initOptionSets() {
|
|
102
|
+
this.optionSets.push({ options: ['id', 'title'] });
|
|
103
|
+
}, _SppModelGetCommand_initTypes = function _SppModelGetCommand_initTypes() {
|
|
104
|
+
this.types.string.push('siteUrl', 'id', 'title');
|
|
105
|
+
this.types.boolean.push('withPublications');
|
|
106
|
+
};
|
|
107
|
+
export default new SppModelGetCommand();
|
|
108
|
+
//# sourceMappingURL=model-get.js.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spe container get
|
|
6
|
+
|
|
7
|
+
Gets a container of a specific container type
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spe container get [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --id <id>`
|
|
19
|
+
: The Id of the container instance.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
<Global />
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
Gets a container of a specific type.
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
m365 spe container get --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Response
|
|
33
|
+
|
|
34
|
+
<Tabs>
|
|
35
|
+
<TabItem value="JSON">
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
|
|
40
|
+
"displayName": "My Application Storage Container",
|
|
41
|
+
"description": "Description of My Application Storage Container",
|
|
42
|
+
"containerTypeId": "91710488-5756-407f-9046-fbe5f0b4de73",
|
|
43
|
+
"status": "active",
|
|
44
|
+
"createdDateTime": "2021-11-24T15:41:52.347Z",
|
|
45
|
+
"settings": {
|
|
46
|
+
"isOcrEnabled": false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
</TabItem>
|
|
52
|
+
<TabItem value="Text">
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
id : b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
|
|
56
|
+
displayName : My Application Storage Container
|
|
57
|
+
description : Description of My Application Storage Container
|
|
58
|
+
containerTypeId : 91710488-5756-407f-9046-fbe5f0b4de73
|
|
59
|
+
status : active
|
|
60
|
+
createdDateTime : 2021-11-24T15:41:52.347Z
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</TabItem>
|
|
64
|
+
<TabItem value="CSV">
|
|
65
|
+
|
|
66
|
+
```csv
|
|
67
|
+
id,displayName,description,containerTypeId,status,createdDateTime
|
|
68
|
+
b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z,My Application Storage Container,Description of My Application Storage Container,91710488-5756-407f-9046-fbe5f0b4de73,active,2021-11-24T15:41:52.347Z
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
</TabItem>
|
|
72
|
+
<TabItem value="Markdown">
|
|
73
|
+
|
|
74
|
+
```md
|
|
75
|
+
# spe container get --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
76
|
+
|
|
77
|
+
Date: 14/03/2024
|
|
78
|
+
|
|
79
|
+
## My Application Storage Container (b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z)
|
|
80
|
+
|
|
81
|
+
Property | Value
|
|
82
|
+
---------|-------
|
|
83
|
+
id | b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
|
|
84
|
+
displayName | My Application Storage Container
|
|
85
|
+
description | Description of My Application Storage Container
|
|
86
|
+
containerTypeId | 91710488-5756-407f-9046-fbe5f0b4de73
|
|
87
|
+
status | active
|
|
88
|
+
createdDateTime | 2021-11-24T15:41:52.347Z
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
</TabItem>
|
|
92
|
+
</Tabs>
|
|
@@ -66,6 +66,9 @@ m365 spo page section add [options]
|
|
|
66
66
|
|
|
67
67
|
`--overlayOpacity [overlayOpacity]`
|
|
68
68
|
: The overlay opacity for the background. Applied only when `zoneEmphasis` is `Image` or `Gradient`. Sets `60` value if not specified.
|
|
69
|
+
|
|
70
|
+
`--collapsibleTitle [collapsibleTitle]`
|
|
71
|
+
: The display name of the collapsible section
|
|
69
72
|
```
|
|
70
73
|
|
|
71
74
|
<Global />
|
|
@@ -100,7 +103,13 @@ Add Vertical section with background shading to the modern page with adjusting t
|
|
|
100
103
|
m365 spo page section add --pageName home.aspx --webUrl https://contoso.sharepoint.com/sites/newsletter --sectionTemplate Vertical --zoneEmphasis Neutral --isLayoutReflowOnTop
|
|
101
104
|
```
|
|
102
105
|
|
|
103
|
-
Add
|
|
106
|
+
Add One Column section as a collapsible section with title
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
m365 spo page section add --pageName home.aspx --webUrl https://contoso.sharepoint.com/sites/newsletter --sectionTemplate OneColumn --isCollapsibleSection --collapsibleTitle "Collapsible Section Title"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Add OneColumn section as a collapsible section as expanded with icon aligned to the left
|
|
104
113
|
|
|
105
114
|
```sh
|
|
106
115
|
m365 spo page section add --pageName home.aspx --webUrl https://contoso.sharepoint.com/sites/newsletter --sectionTemplate OneColumn --isCollapsibleSection --isExpanded --iconAlignment Left
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo tenant homesite list
|
|
6
|
+
|
|
7
|
+
Lists all home sites
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo tenant homesite list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
<Global />
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
List all home sites
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
m365 spo tenant homesite list
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Response
|
|
28
|
+
|
|
29
|
+
<Tabs>
|
|
30
|
+
<TabItem value="JSON">
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
[
|
|
34
|
+
{
|
|
35
|
+
"Audiences": [
|
|
36
|
+
{
|
|
37
|
+
"Email": "ColumnSearchable@contoso.onmicrosoft.com",
|
|
38
|
+
"Id": "978b5280-4f80-47ea-a1db-b0d1d2fb1ba4",
|
|
39
|
+
"Title": "ColumnSearchable Members"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"IsInDraftMode": false,
|
|
43
|
+
"IsVivaBackendSite": false,
|
|
44
|
+
"SiteId": "431d7819-4aaf-49a1-b664-b2fe9e609b63",
|
|
45
|
+
"TargetedLicenseType": 2,
|
|
46
|
+
"Title": "The Landing",
|
|
47
|
+
"Url": "https://contoso.sharepoint.com/sites/TheLanding",
|
|
48
|
+
"VivaConnectionsDefaultStart": true,
|
|
49
|
+
"WebId": "626c1724-8ac8-45d5-af87-c07c752fab75"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
</TabItem>
|
|
55
|
+
<TabItem value="Text">
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
Url Title
|
|
59
|
+
----------------------------------------------- -----------
|
|
60
|
+
https://contoso.sharepoint.com/sites/TheLanding The Landing
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</TabItem>
|
|
64
|
+
<TabItem value="CSV">
|
|
65
|
+
|
|
66
|
+
```csv
|
|
67
|
+
IsInDraftMode,IsVivaBackendSite,SiteId,TargetedLicenseType,Title,Url,VivaConnectionsDefaultStart,WebId
|
|
68
|
+
0,0,431d7819-4aaf-49a1-b664-b2fe9e609b63,2,The Landing,https://contoso.sharepoint.com/sites/TheLanding,1,626c1724-8ac8-45d5-af87-c07c752fab75
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
</TabItem>
|
|
72
|
+
<TabItem value="Markdown">
|
|
73
|
+
|
|
74
|
+
```md
|
|
75
|
+
# spo tenant homesite list
|
|
76
|
+
|
|
77
|
+
Date: 11/18/2024
|
|
78
|
+
|
|
79
|
+
Property | Value
|
|
80
|
+
---------|-------
|
|
81
|
+
IsInDraftMode | false
|
|
82
|
+
IsVivaBackendSite | false
|
|
83
|
+
SiteId | 431d7819-4aaf-49a1-b664-b2fe9e609b63
|
|
84
|
+
TargetedLicenseType | 2
|
|
85
|
+
Title | The Landing
|
|
86
|
+
Url | https://contoso.sharepoint.com/sites/TheLanding
|
|
87
|
+
VivaConnectionsDefaultStart | true
|
|
88
|
+
WebId | 626c1724-8ac8-45d5-af87-c07c752fab75
|
|
89
|
+
```
|
|
90
|
+
</TabItem>
|
|
91
|
+
</Tabs>
|
|
92
|
+
|
|
93
|
+
## More information
|
|
94
|
+
|
|
95
|
+
- SharePoint home sites [Viva Connections set up](https://learn.microsoft.com/en-us/viva/connections/set-up-admin-center)
|
|
@@ -18,29 +18,56 @@ m365 spo user ensure [options]
|
|
|
18
18
|
`-u, --webUrl <webUrl>`
|
|
19
19
|
: Absolute URL of the site.
|
|
20
20
|
|
|
21
|
-
`--entraId [
|
|
22
|
-
: Id of the user in Entra. Specify either `entraId` or `
|
|
21
|
+
`--entraId [entraId]`
|
|
22
|
+
: Id of the user in Entra ID. Specify either `entraId`, `userName`, `loginName`, `entraGroupId` or `entraGroupName`.
|
|
23
23
|
|
|
24
24
|
`--userName [userName]`
|
|
25
|
-
: User's UPN (user principal name, e.g. john@contoso.com). Specify either `entraId` or `
|
|
25
|
+
: User's UPN (user principal name, e.g. john@contoso.com). Specify either `entraId`, `userName`, `loginName`, `entraGroupId` or `entraGroupName`.
|
|
26
|
+
|
|
27
|
+
`--loginName [loginName]`
|
|
28
|
+
: The login name of the principal. Specify either `entraId`, `userName`, `loginName`, `entraGroupId` or `entraGroupName`.
|
|
29
|
+
|
|
30
|
+
`--entraGroupId [entraGroupId]`
|
|
31
|
+
: ID of the Microsoft Entra group. Specify either `entraId`, `userName`, `loginName`, `entraGroupId` or `entraGroupName`.
|
|
32
|
+
|
|
33
|
+
`--entraGroupName [entraGroupName]`
|
|
34
|
+
: Display name of the Microsoft Entra group. Specify either `entraId`, `userName`, `loginName`, `entraGroupId` or `entraGroupName`.
|
|
26
35
|
```
|
|
27
36
|
|
|
28
37
|
<Global />
|
|
29
38
|
|
|
30
39
|
## Examples
|
|
31
40
|
|
|
32
|
-
|
|
41
|
+
Ensure a user by its Entra Id.
|
|
33
42
|
|
|
34
43
|
```sh
|
|
35
44
|
m365 spo user ensure --webUrl https://contoso.sharepoint.com/sites/project --entraId e254750a-eaa4-44f6-9517-b74f65cdb747
|
|
36
45
|
```
|
|
37
46
|
|
|
38
|
-
|
|
47
|
+
Ensure a user by its user principal name.
|
|
39
48
|
|
|
40
49
|
```sh
|
|
41
50
|
m365 spo user ensure --webUrl https://contoso.sharepoint.com/sites/project --userName john@contoso.com
|
|
42
51
|
```
|
|
43
52
|
|
|
53
|
+
Ensure a user by its login name.
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 spo user ensure --webUrl https://contoso.sharepoint.com/sites/Marketing --loginName "i:0#.f|membership|john.doe@contoso.com"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Ensure a Microsoft Entra group by ID.
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
m365 spo user ensure --webUrl https://contoso.sharepoint.com/sites/Marketing --entraGroupId e08e899f-ba40-4e91-ab36-44d4fbaa454e
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Ensure a Microsoft Entra group by display name.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
m365 spo user ensure --webUrl https://contoso.sharepoint.com/sites/Marketing --entraGroupName "Marketing team"
|
|
69
|
+
```
|
|
70
|
+
|
|
44
71
|
## Response
|
|
45
72
|
|
|
46
73
|
<Tabs>
|
|
@@ -119,4 +146,3 @@ m365 spo user ensure --webUrl https://contoso.sharepoint.com/sites/project --use
|
|
|
119
146
|
|
|
120
147
|
</TabItem>
|
|
121
148
|
</Tabs>
|
|
122
|
-
|