@pnp/cli-microsoft365 10.9.0-beta.a81e0f3 → 10.9.0
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/.devcontainer/Dockerfile +1 -1
- package/Dockerfile +3 -3
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/entra/commands/m365group/m365group-get.js +16 -3
- package/dist/m365/entra/commands/m365group/m365group-list.js +7 -1
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +9 -3
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +9 -3
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +9 -3
- package/dist/m365/flow/commands/flow-list.js +14 -7
- package/dist/m365/flow/commands/run/run-get.js +1 -1
- package/dist/m365/graph/commands/subscription/subscription-add.js +10 -3
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +8 -1
- package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +9 -2
- package/dist/m365/spo/commands/file/file-move.js +8 -2
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +14 -5
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +9 -2
- package/dist/m365/spo/commands/page/clientsidepages.js +49 -17
- package/dist/m365/spo/commands/tenant/tenant-site-list.js +16 -5
- package/dist/m365/spo/commands/term/term-list.js +10 -3
- package/dist/m365/teams/commands/chat/chat-member-add.js +10 -4
- package/dist/m365/viva/commands/engage/engage-community-remove.js +99 -0
- package/dist/m365/viva/commands/engage/engage-network-list.js +8 -2
- package/dist/m365/viva/commands.js +1 -0
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +8 -5
- package/docs/docs/cmd/entra/m365group/m365group-list.mdx +14 -12
- package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +7 -4
- package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +9 -6
- package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +7 -4
- package/docs/docs/cmd/flow/flow-list.mdx +8 -5
- package/docs/docs/cmd/flow/run/run-get.mdx +1 -1
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +6 -3
- package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +7 -4
- package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +7 -4
- package/docs/docs/cmd/spo/file/file-move.mdx +4 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +6 -3
- package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +7 -4
- package/docs/docs/cmd/spo/list/list-add.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-set.mdx +2 -2
- package/docs/docs/cmd/spo/tenant/tenant-site-list.mdx +10 -7
- package/docs/docs/cmd/spo/term/term-list.mdx +7 -4
- package/docs/docs/cmd/teams/chat/chat-member-add.mdx +6 -3
- package/docs/docs/cmd/viva/engage/engage-community-remove.mdx +61 -0
- package/docs/docs/cmd/viva/engage/engage-network-list.mdx +7 -4
- package/package.json +2 -2
|
@@ -309,6 +309,12 @@ export class ClientSidePage {
|
|
|
309
309
|
control.fromHtml(markup);
|
|
310
310
|
page.pageSettings = control;
|
|
311
311
|
break;
|
|
312
|
+
case 1:
|
|
313
|
+
// empty canvas column
|
|
314
|
+
control = new CanvasColumn(null, 0);
|
|
315
|
+
control.fromHtml(markup);
|
|
316
|
+
page.mergeColumnToTree(control);
|
|
317
|
+
break;
|
|
312
318
|
case 3:
|
|
313
319
|
// client side webpart
|
|
314
320
|
control = new ClientSideWebpart("");
|
|
@@ -380,9 +386,9 @@ export class ClientSidePage {
|
|
|
380
386
|
}
|
|
381
387
|
}
|
|
382
388
|
}
|
|
383
|
-
const sections = this.sections.filter(s => s.order === zoneIndex);
|
|
389
|
+
const sections = this.sections.filter(s => s.order === zoneIndex && s.layoutIndex === (control.controlData?.position.layoutIndex ?? 1));
|
|
384
390
|
if (sections.length < 1) {
|
|
385
|
-
section = new CanvasSection(this, zoneIndex, [], control?.controlData
|
|
391
|
+
section = new CanvasSection(this, zoneIndex, [], control?.controlData);
|
|
386
392
|
this.sections.push(section);
|
|
387
393
|
}
|
|
388
394
|
else {
|
|
@@ -406,11 +412,11 @@ export class ClientSidePage {
|
|
|
406
412
|
* @param position The position data for the column
|
|
407
413
|
*/
|
|
408
414
|
mergeColumnToTree(column) {
|
|
409
|
-
const order = column
|
|
415
|
+
const order = column?.controlData?.position.zoneIndex || 0;
|
|
410
416
|
let section = null;
|
|
411
|
-
const sections = this.sections.filter(s => s.order === order);
|
|
417
|
+
const sections = this.sections.filter(s => s.order === order && s.layoutIndex === (column?.controlData?.position.layoutIndex ?? 1));
|
|
412
418
|
if (sections.length < 1) {
|
|
413
|
-
section = new CanvasSection(this, order, [], column.controlData
|
|
419
|
+
section = new CanvasSection(this, order, [], column.controlData);
|
|
414
420
|
this.sections.push(section);
|
|
415
421
|
}
|
|
416
422
|
else {
|
|
@@ -421,12 +427,16 @@ export class ClientSidePage {
|
|
|
421
427
|
}
|
|
422
428
|
}
|
|
423
429
|
export class CanvasSection {
|
|
424
|
-
constructor(page, order, columns = [],
|
|
430
|
+
constructor(page, order, columns = [], controlData) {
|
|
425
431
|
this.page = page;
|
|
426
432
|
this.order = order;
|
|
427
433
|
this.columns = columns;
|
|
428
|
-
this.
|
|
429
|
-
this.
|
|
434
|
+
this.controlData = controlData;
|
|
435
|
+
this.zoneId = this.controlData?.position.zoneId || getGUID();
|
|
436
|
+
this.zoneGroupMetadata = this.controlData?.zoneGroupMetadata;
|
|
437
|
+
this.emphasis = this.controlData?.emphasis;
|
|
438
|
+
this.layoutIndex = this.controlData?.position.layoutIndex ?? 1;
|
|
439
|
+
this.isLayoutReflowOnTop = this.controlData?.position.isLayoutReflowOnTop;
|
|
430
440
|
}
|
|
431
441
|
/**
|
|
432
442
|
* Default column (this.columns[0]) for this section
|
|
@@ -454,7 +464,7 @@ export class CanvasSection {
|
|
|
454
464
|
}
|
|
455
465
|
}
|
|
456
466
|
class CanvasControl {
|
|
457
|
-
constructor(controlType, dataVersion, column
|
|
467
|
+
constructor(controlType, dataVersion, column, order = 1, id = getGUID(), controlData, dynamicDataPaths = null, dynamicDataValues = null) {
|
|
458
468
|
this.controlType = controlType;
|
|
459
469
|
this.dataVersion = dataVersion;
|
|
460
470
|
this.column = column;
|
|
@@ -542,16 +552,26 @@ export class CanvasColumn extends CanvasControl {
|
|
|
542
552
|
}
|
|
543
553
|
}
|
|
544
554
|
getControlData() {
|
|
545
|
-
|
|
546
|
-
displayMode: 2,
|
|
555
|
+
const controlData = {
|
|
547
556
|
position: {
|
|
548
557
|
sectionFactor: this.factor,
|
|
549
558
|
sectionIndex: this.order,
|
|
550
|
-
zoneIndex: this.section
|
|
551
|
-
zoneId: this.section?.zoneId
|
|
559
|
+
zoneIndex: this.section?.order || 0,
|
|
560
|
+
zoneId: this.section?.zoneId,
|
|
561
|
+
layoutIndex: this.section?.layoutIndex,
|
|
552
562
|
},
|
|
553
563
|
zoneGroupMetadata: this.section?.zoneGroupMetadata,
|
|
564
|
+
emphasis: this.section?.emphasis
|
|
554
565
|
};
|
|
566
|
+
if (this.column?.section?.isLayoutReflowOnTop !== undefined) {
|
|
567
|
+
controlData.position.isLayoutReflowOnTop = this.column.section.isLayoutReflowOnTop;
|
|
568
|
+
}
|
|
569
|
+
const isEmptyColumn = this.controls.length === 0;
|
|
570
|
+
if (isEmptyColumn) {
|
|
571
|
+
controlData.id = "emptySection";
|
|
572
|
+
controlData.controlType = 1;
|
|
573
|
+
}
|
|
574
|
+
return controlData;
|
|
555
575
|
}
|
|
556
576
|
/**
|
|
557
577
|
* Removes this column and all contained controls from the collection
|
|
@@ -650,7 +670,7 @@ export class ClientSideText extends ClientSidePart {
|
|
|
650
670
|
this._text = text;
|
|
651
671
|
}
|
|
652
672
|
getControlData() {
|
|
653
|
-
|
|
673
|
+
const controlData = {
|
|
654
674
|
controlType: this.controlType,
|
|
655
675
|
editorType: "CKEditor",
|
|
656
676
|
id: this.id,
|
|
@@ -659,10 +679,16 @@ export class ClientSideText extends ClientSidePart {
|
|
|
659
679
|
sectionFactor: this.column ? this.column.factor : 0,
|
|
660
680
|
sectionIndex: this.column ? this.column.order : 0,
|
|
661
681
|
zoneIndex: this.column && this.column.section ? this.column.section.order : 0,
|
|
662
|
-
zoneId: this.column?.section?.zoneId
|
|
682
|
+
zoneId: this.column?.section?.zoneId,
|
|
683
|
+
layoutIndex: this.column?.section?.layoutIndex
|
|
663
684
|
},
|
|
664
685
|
zoneGroupMetadata: this.column?.section?.zoneGroupMetadata,
|
|
686
|
+
emphasis: this.column?.section?.emphasis,
|
|
665
687
|
};
|
|
688
|
+
if (this.column?.section?.isLayoutReflowOnTop !== undefined) {
|
|
689
|
+
controlData.position.isLayoutReflowOnTop = this.column.section.isLayoutReflowOnTop;
|
|
690
|
+
}
|
|
691
|
+
return controlData;
|
|
666
692
|
}
|
|
667
693
|
toHtml(index) {
|
|
668
694
|
// set our order to the value passed in
|
|
@@ -767,7 +793,7 @@ export class ClientSideWebpart extends ClientSidePart {
|
|
|
767
793
|
this.htmlProperties = htmlProps.length > 0 ? htmlProps[0] : "";
|
|
768
794
|
}
|
|
769
795
|
getControlData() {
|
|
770
|
-
|
|
796
|
+
const controlData = {
|
|
771
797
|
controlType: this.controlType,
|
|
772
798
|
id: this.id,
|
|
773
799
|
position: {
|
|
@@ -775,11 +801,17 @@ export class ClientSideWebpart extends ClientSidePart {
|
|
|
775
801
|
sectionFactor: this.column ? this.column.factor : 0,
|
|
776
802
|
sectionIndex: this.column ? this.column.order : 0,
|
|
777
803
|
zoneIndex: this.column && this.column.section ? this.column.section.order : 0,
|
|
778
|
-
zoneId: this.column?.section?.zoneId
|
|
804
|
+
zoneId: this.column?.section?.zoneId,
|
|
805
|
+
layoutIndex: this.column?.section?.layoutIndex,
|
|
779
806
|
},
|
|
780
807
|
webPartId: this.webPartId,
|
|
781
808
|
zoneGroupMetadata: this.column?.section?.zoneGroupMetadata,
|
|
809
|
+
emphasis: this.column?.section?.emphasis,
|
|
782
810
|
};
|
|
811
|
+
if (this.column?.section?.isLayoutReflowOnTop !== undefined) {
|
|
812
|
+
controlData.position.isLayoutReflowOnTop = this.column.section.isLayoutReflowOnTop;
|
|
813
|
+
}
|
|
814
|
+
return controlData;
|
|
783
815
|
}
|
|
784
816
|
renderHtmlProperties() {
|
|
785
817
|
const html = [];
|
|
@@ -31,8 +31,11 @@ class SpoTenantSiteListCommand extends SpoCommand {
|
|
|
31
31
|
return [commands.SITE_LIST];
|
|
32
32
|
}
|
|
33
33
|
async commandAction(logger, args) {
|
|
34
|
+
if (args.options.includeOneDriveSites) {
|
|
35
|
+
await this.warn(logger, `Parameter 'includeOneDriveSites' is deprecated. Please use 'withOneDriveSites' instead`);
|
|
36
|
+
}
|
|
34
37
|
const webTemplate = this.getWebTemplateId(args.options);
|
|
35
|
-
const includeOneDriveSites = args.options.includeOneDriveSites || false;
|
|
38
|
+
const includeOneDriveSites = (args.options.includeOneDriveSites || args.options.withOneDriveSites) || false;
|
|
36
39
|
const personalSite = includeOneDriveSites === false ? '0' : '1';
|
|
37
40
|
try {
|
|
38
41
|
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
@@ -76,7 +79,7 @@ class SpoTenantSiteListCommand extends SpoCommand {
|
|
|
76
79
|
if (options.webTemplate) {
|
|
77
80
|
return options.webTemplate;
|
|
78
81
|
}
|
|
79
|
-
if (options.includeOneDriveSites) {
|
|
82
|
+
if (options.includeOneDriveSites || options.withOneDriveSites) {
|
|
80
83
|
return '';
|
|
81
84
|
}
|
|
82
85
|
switch (options.type) {
|
|
@@ -95,7 +98,8 @@ _SpoTenantSiteListCommand_instances = new WeakSet(), _SpoTenantSiteListCommand_i
|
|
|
95
98
|
webTemplate: args.options.webTemplate,
|
|
96
99
|
type: args.options.type,
|
|
97
100
|
filter: (!(!args.options.filter)).toString(),
|
|
98
|
-
includeOneDriveSites: typeof args.options.includeOneDriveSites !== 'undefined'
|
|
101
|
+
includeOneDriveSites: typeof args.options.includeOneDriveSites !== 'undefined',
|
|
102
|
+
withOneDriveSites: typeof args.options.withOneDriveSites !== 'undefined'
|
|
99
103
|
});
|
|
100
104
|
});
|
|
101
105
|
}, _SpoTenantSiteListCommand_initOptions = function _SpoTenantSiteListCommand_initOptions() {
|
|
@@ -108,6 +112,8 @@ _SpoTenantSiteListCommand_instances = new WeakSet(), _SpoTenantSiteListCommand_i
|
|
|
108
112
|
option: '--filter [filter]'
|
|
109
113
|
}, {
|
|
110
114
|
option: '--includeOneDriveSites'
|
|
115
|
+
}, {
|
|
116
|
+
option: '--withOneDriveSites'
|
|
111
117
|
});
|
|
112
118
|
}, _SpoTenantSiteListCommand_initValidators = function _SpoTenantSiteListCommand_initValidators() {
|
|
113
119
|
this.validators.push(async (args) => {
|
|
@@ -119,9 +125,14 @@ _SpoTenantSiteListCommand_instances = new WeakSet(), _SpoTenantSiteListCommand_i
|
|
|
119
125
|
typeValues.indexOf(args.options.type) < 0) {
|
|
120
126
|
return `${args.options.type} is not a valid value for the type option. Allowed values are ${typeValues.join('|')}`;
|
|
121
127
|
}
|
|
122
|
-
if (args.options.includeOneDriveSites
|
|
128
|
+
if (args.options.includeOneDriveSites || args.options.withOneDriveSites
|
|
123
129
|
&& (args.options.type || args.options.webTemplate)) {
|
|
124
|
-
|
|
130
|
+
if (args.options.includeOneDriveSites) {
|
|
131
|
+
return 'When using includeOneDriveSites, don\'t specify the type or webTemplate options';
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
return 'When using withOneDriveSites, don\'t specify the type or webTemplate options';
|
|
135
|
+
}
|
|
125
136
|
}
|
|
126
137
|
return true;
|
|
127
138
|
});
|
|
@@ -31,6 +31,9 @@ class SpoTermListCommand extends SpoCommand {
|
|
|
31
31
|
__classPrivateFieldGet(this, _SpoTermListCommand_instances, "m", _SpoTermListCommand_initOptionSets).call(this);
|
|
32
32
|
}
|
|
33
33
|
async commandAction(logger, args) {
|
|
34
|
+
if (args.options.includeChildTerms) {
|
|
35
|
+
await this.warn(logger, `Parameter 'includeChildTerms' is deprecated. Please use 'withChildTerms' instead`);
|
|
36
|
+
}
|
|
34
37
|
try {
|
|
35
38
|
const spoWebUrl = args.options.webUrl ? args.options.webUrl : await spo.getSpoAdminUrl(logger, this.debug);
|
|
36
39
|
const res = await spo.getRequestDigest(spoWebUrl);
|
|
@@ -40,13 +43,14 @@ class SpoTermListCommand extends SpoCommand {
|
|
|
40
43
|
const termGroupQuery = args.options.termGroupId ? `<Method Id="77" ParentId="75" Name="GetById"><Parameters><Parameter Type="Guid">{${args.options.termGroupId}}</Parameter></Parameters></Method>` : `<Method Id="77" ParentId="75" Name="GetByName"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.termGroupName)}</Parameter></Parameters></Method>`;
|
|
41
44
|
const termSetQuery = args.options.termSetId ? `<Method Id="82" ParentId="80" Name="GetById"><Parameters><Parameter Type="Guid">{${args.options.termSetId}}</Parameter></Parameters></Method>` : `<Method Id="82" ParentId="80" Name="GetByName"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.termSetName)}</Parameter></Parameters></Method>`;
|
|
42
45
|
const data = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="70" ObjectPathId="69" /><ObjectIdentityQuery Id="71" ObjectPathId="69" /><ObjectPath Id="73" ObjectPathId="72" /><ObjectIdentityQuery Id="74" ObjectPathId="72" /><ObjectPath Id="76" ObjectPathId="75" /><ObjectPath Id="78" ObjectPathId="77" /><ObjectIdentityQuery Id="79" ObjectPathId="77" /><ObjectPath Id="81" ObjectPathId="80" /><ObjectPath Id="83" ObjectPathId="82" /><ObjectIdentityQuery Id="84" ObjectPathId="82" /><ObjectPath Id="86" ObjectPathId="85" /><Query Id="87" ObjectPathId="85"><Query SelectAllProperties="false"><Properties /></Query><ChildItemQuery SelectAllProperties="true"><Properties><Property Name="Name" ScalarProperty="true" /><Property Name="Id" ScalarProperty="true" /></Properties></ChildItemQuery></Query></Actions><ObjectPaths><StaticMethod Id="69" Name="GetTaxonomySession" TypeId="{981cbc68-9edc-4f8d-872f-71146fcbb84f}" /><Method Id="72" ParentId="69" Name="GetDefaultSiteCollectionTermStore" /><Property Id="75" ParentId="72" Name="Groups" />${termGroupQuery}<Property Id="80" ParentId="77" Name="TermSets" />${termSetQuery}<Property Id="85" ParentId="82" Name="Terms" /></ObjectPaths></Request>`;
|
|
46
|
+
const shouldIncludeChildTerms = args.options.includeChildTerms || args.options.withChildTerms;
|
|
43
47
|
const result = await this.executeCsomCall(data, spoWebUrl, res);
|
|
44
48
|
const terms = [];
|
|
45
49
|
if (result._Child_Items_ && result._Child_Items_.length > 0) {
|
|
46
50
|
for (const term of result._Child_Items_) {
|
|
47
51
|
this.setTermDetails(term);
|
|
48
52
|
terms.push(term);
|
|
49
|
-
if (
|
|
53
|
+
if (shouldIncludeChildTerms && term.TermsCount > 0) {
|
|
50
54
|
await this.getChildTerms(spoWebUrl, res, term);
|
|
51
55
|
}
|
|
52
56
|
}
|
|
@@ -54,7 +58,7 @@ class SpoTermListCommand extends SpoCommand {
|
|
|
54
58
|
if (!args.options.output || !cli.shouldTrimOutput(args.options.output)) {
|
|
55
59
|
await logger.log(terms);
|
|
56
60
|
}
|
|
57
|
-
else if (!
|
|
61
|
+
else if (!shouldIncludeChildTerms) {
|
|
58
62
|
// Converted to text friendly output
|
|
59
63
|
await logger.log(terms.map(i => {
|
|
60
64
|
return {
|
|
@@ -142,7 +146,8 @@ _SpoTermListCommand_instances = new WeakSet(), _SpoTermListCommand_initTelemetry
|
|
|
142
146
|
termGroupName: typeof args.options.termGroupName !== 'undefined',
|
|
143
147
|
termSetId: typeof args.options.termSetId !== 'undefined',
|
|
144
148
|
termSetName: typeof args.options.termSetName !== 'undefined',
|
|
145
|
-
includeChildTerms: !!args.options.includeChildTerms
|
|
149
|
+
includeChildTerms: !!args.options.includeChildTerms,
|
|
150
|
+
withChildTerms: !!args.options.withChildTerms
|
|
146
151
|
});
|
|
147
152
|
});
|
|
148
153
|
}, _SpoTermListCommand_initOptions = function _SpoTermListCommand_initOptions() {
|
|
@@ -158,6 +163,8 @@ _SpoTermListCommand_instances = new WeakSet(), _SpoTermListCommand_initTelemetry
|
|
|
158
163
|
option: '--termSetName [termSetName]'
|
|
159
164
|
}, {
|
|
160
165
|
option: '--includeChildTerms'
|
|
166
|
+
}, {
|
|
167
|
+
option: '--withChildTerms'
|
|
161
168
|
});
|
|
162
169
|
}, _SpoTermListCommand_initValidators = function _SpoTermListCommand_initValidators() {
|
|
163
170
|
this.validators.push(async (args) => {
|
|
@@ -29,6 +29,9 @@ class TeamsChatMemberAddCommand extends GraphCommand {
|
|
|
29
29
|
if (this.verbose) {
|
|
30
30
|
await logger.logToStderr(`Adding member ${args.options.userId || args.options.userName} to chat with id ${args.options.chatId}...`);
|
|
31
31
|
}
|
|
32
|
+
if (args.options.includeAllHistory) {
|
|
33
|
+
await this.warn(logger, `Parameter 'includeAllHistory' is deprecated. Please use 'withAllHistory' instead`);
|
|
34
|
+
}
|
|
32
35
|
const chatMemberAddOptions = {
|
|
33
36
|
url: `${this.resource}/v1.0/chats/${args.options.chatId}/members`,
|
|
34
37
|
headers: {
|
|
@@ -38,7 +41,7 @@ class TeamsChatMemberAddCommand extends GraphCommand {
|
|
|
38
41
|
data: {
|
|
39
42
|
'@odata.type': '#microsoft.graph.aadUserConversationMember',
|
|
40
43
|
'user@odata.bind': `https://graph.microsoft.com/v1.0/users/${args.options.userId || formatting.encodeQueryParameter(args.options.userName)}`,
|
|
41
|
-
visibleHistoryStartDateTime: args.options.includeAllHistory ? '0001-01-01T00:00:00Z' : args.options.visibleHistoryStartDateTime,
|
|
44
|
+
visibleHistoryStartDateTime: (args.options.includeAllHistory || args.options.withAllHistory) ? '0001-01-01T00:00:00Z' : args.options.visibleHistoryStartDateTime,
|
|
42
45
|
roles: [args.options.role || 'owner']
|
|
43
46
|
}
|
|
44
47
|
};
|
|
@@ -56,7 +59,8 @@ _a = TeamsChatMemberAddCommand, _TeamsChatMemberAddCommand_instances = new WeakS
|
|
|
56
59
|
userName: typeof args.options.userName !== 'undefined',
|
|
57
60
|
role: typeof args.options.role !== 'undefined',
|
|
58
61
|
visibleHistoryStartDateTime: typeof args.options.visibleHistoryStartDateTime !== 'undefined',
|
|
59
|
-
includeAllHistory: !!args.options.includeAllHistory
|
|
62
|
+
includeAllHistory: !!args.options.includeAllHistory,
|
|
63
|
+
withAllHistory: !!args.options.withAllHistory
|
|
60
64
|
});
|
|
61
65
|
});
|
|
62
66
|
}, _TeamsChatMemberAddCommand_initOptions = function _TeamsChatMemberAddCommand_initOptions() {
|
|
@@ -73,6 +77,8 @@ _a = TeamsChatMemberAddCommand, _TeamsChatMemberAddCommand_instances = new WeakS
|
|
|
73
77
|
option: '--visibleHistoryStartDateTime [visibleHistoryStartDateTime]'
|
|
74
78
|
}, {
|
|
75
79
|
option: '--includeAllHistory'
|
|
80
|
+
}, {
|
|
81
|
+
option: '--withAllHistory'
|
|
76
82
|
});
|
|
77
83
|
}, _TeamsChatMemberAddCommand_initValidators = function _TeamsChatMemberAddCommand_initValidators() {
|
|
78
84
|
this.validators.push(async (args) => {
|
|
@@ -95,8 +101,8 @@ _a = TeamsChatMemberAddCommand, _TeamsChatMemberAddCommand_instances = new WeakS
|
|
|
95
101
|
});
|
|
96
102
|
}, _TeamsChatMemberAddCommand_initOptionSets = function _TeamsChatMemberAddCommand_initOptionSets() {
|
|
97
103
|
this.optionSets.push({ options: ['userId', 'userName'] }, {
|
|
98
|
-
options: ['visibleHistoryStartDateTime', 'includeAllHistory'],
|
|
99
|
-
runsWhen: (args) => args.options.visibleHistoryStartDateTime || args.options.includeAllHistory
|
|
104
|
+
options: ['visibleHistoryStartDateTime', 'includeAllHistory', 'withAllHistory'],
|
|
105
|
+
runsWhen: (args) => args.options.visibleHistoryStartDateTime || args.options.includeAllHistory || args.options.withAllHistory
|
|
100
106
|
});
|
|
101
107
|
};
|
|
102
108
|
TeamsChatMemberAddCommand.roles = ['owner', 'guest'];
|
|
@@ -0,0 +1,99 @@
|
|
|
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 _VivaEngageCommunityRemoveCommand_instances, _VivaEngageCommunityRemoveCommand_initTelemetry, _VivaEngageCommunityRemoveCommand_initOptions, _VivaEngageCommunityRemoveCommand_initValidators, _VivaEngageCommunityRemoveCommand_initOptionSets, _VivaEngageCommunityRemoveCommand_initTypes;
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
|
+
import request from '../../../../request.js';
|
|
9
|
+
import { validation } from '../../../../utils/validation.js';
|
|
10
|
+
import { vivaEngage } from '../../../../utils/vivaEngage.js';
|
|
11
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
|
+
import commands from '../../commands.js';
|
|
13
|
+
class VivaEngageCommunityRemoveCommand extends GraphCommand {
|
|
14
|
+
get name() {
|
|
15
|
+
return commands.ENGAGE_COMMUNITY_REMOVE;
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return 'Removes a Viva Engage community';
|
|
19
|
+
}
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
_VivaEngageCommunityRemoveCommand_instances.add(this);
|
|
23
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initTelemetry).call(this);
|
|
24
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initOptions).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initValidators).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initOptionSets).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initTypes).call(this);
|
|
28
|
+
}
|
|
29
|
+
async commandAction(logger, args) {
|
|
30
|
+
const removeCommunity = async () => {
|
|
31
|
+
try {
|
|
32
|
+
let communityId = args.options.id;
|
|
33
|
+
if (args.options.displayName) {
|
|
34
|
+
communityId = (await vivaEngage.getCommunityByDisplayName(args.options.displayName, ['id'])).id;
|
|
35
|
+
}
|
|
36
|
+
else if (args.options.entraGroupId) {
|
|
37
|
+
communityId = (await vivaEngage.getCommunityByEntraGroupId(args.options.entraGroupId, ['id'])).id;
|
|
38
|
+
}
|
|
39
|
+
if (args.options.verbose) {
|
|
40
|
+
await logger.logToStderr(`Removing Viva Engage community with ID ${communityId}...`);
|
|
41
|
+
}
|
|
42
|
+
const requestOptions = {
|
|
43
|
+
url: `${this.resource}/v1.0/employeeExperience/communities/${communityId}`,
|
|
44
|
+
headers: {
|
|
45
|
+
accept: 'application/json;odata.metadata=none'
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
await request.delete(requestOptions);
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
this.handleRejectedODataJsonPromise(err);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
if (args.options.force) {
|
|
55
|
+
await removeCommunity();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove Viva Engage community '${args.options.id || args.options.displayName || args.options.entraGroupId}'?` });
|
|
59
|
+
if (result) {
|
|
60
|
+
await removeCommunity();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
_VivaEngageCommunityRemoveCommand_instances = new WeakSet(), _VivaEngageCommunityRemoveCommand_initTelemetry = function _VivaEngageCommunityRemoveCommand_initTelemetry() {
|
|
66
|
+
this.telemetry.push((args) => {
|
|
67
|
+
Object.assign(this.telemetryProperties, {
|
|
68
|
+
id: args.options.id !== 'undefined',
|
|
69
|
+
displayName: args.options.displayName !== 'undefined',
|
|
70
|
+
entraGroupId: args.options.entraGroupId !== 'undefined',
|
|
71
|
+
force: !!args.options.force
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}, _VivaEngageCommunityRemoveCommand_initOptions = function _VivaEngageCommunityRemoveCommand_initOptions() {
|
|
75
|
+
this.options.unshift({
|
|
76
|
+
option: '-i, --id [id]'
|
|
77
|
+
}, {
|
|
78
|
+
option: '-n, --displayName [displayName]'
|
|
79
|
+
}, {
|
|
80
|
+
option: '--entraGroupId [entraGroupId]'
|
|
81
|
+
}, {
|
|
82
|
+
option: '-f, --force'
|
|
83
|
+
});
|
|
84
|
+
}, _VivaEngageCommunityRemoveCommand_initValidators = function _VivaEngageCommunityRemoveCommand_initValidators() {
|
|
85
|
+
this.validators.push(async (args) => {
|
|
86
|
+
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
87
|
+
return `${args.options.entraGroupId} is not a valid GUID for the option 'entraGroupId'.`;
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
});
|
|
91
|
+
}, _VivaEngageCommunityRemoveCommand_initOptionSets = function _VivaEngageCommunityRemoveCommand_initOptionSets() {
|
|
92
|
+
this.optionSets.push({
|
|
93
|
+
options: ['id', 'displayName', 'entraGroupId']
|
|
94
|
+
});
|
|
95
|
+
}, _VivaEngageCommunityRemoveCommand_initTypes = function _VivaEngageCommunityRemoveCommand_initTypes() {
|
|
96
|
+
this.types.string.push('id', 'displayName', 'entraGroupId');
|
|
97
|
+
};
|
|
98
|
+
export default new VivaEngageCommunityRemoveCommand();
|
|
99
|
+
//# sourceMappingURL=engage-community-remove.js.map
|
|
@@ -24,6 +24,9 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
|
|
|
24
24
|
__classPrivateFieldGet(this, _VivaEngageNetworkListCommand_instances, "m", _VivaEngageNetworkListCommand_initOptions).call(this);
|
|
25
25
|
}
|
|
26
26
|
async commandAction(logger, args) {
|
|
27
|
+
if (args.options.includeSuspended) {
|
|
28
|
+
await this.warn(logger, `Parameter 'includeSuspended' is deprecated. Please use 'withSuspended' instead`);
|
|
29
|
+
}
|
|
27
30
|
const requestOptions = {
|
|
28
31
|
url: `${this.resource}/v1/networks/current.json`,
|
|
29
32
|
headers: {
|
|
@@ -32,7 +35,7 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
|
|
|
32
35
|
},
|
|
33
36
|
responseType: 'json',
|
|
34
37
|
data: {
|
|
35
|
-
includeSuspended: args.options.includeSuspended !== undefined && args.options.includeSuspended !== false
|
|
38
|
+
includeSuspended: (args.options.includeSuspended !== undefined && args.options.includeSuspended !== false) || (args.options.withSuspended !== undefined && args.options.withSuspended !== false)
|
|
36
39
|
}
|
|
37
40
|
};
|
|
38
41
|
try {
|
|
@@ -47,12 +50,15 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
|
|
|
47
50
|
_VivaEngageNetworkListCommand_instances = new WeakSet(), _VivaEngageNetworkListCommand_initTelemetry = function _VivaEngageNetworkListCommand_initTelemetry() {
|
|
48
51
|
this.telemetry.push((args) => {
|
|
49
52
|
Object.assign(this.telemetryProperties, {
|
|
50
|
-
includeSuspended: args.options.includeSuspended
|
|
53
|
+
includeSuspended: args.options.includeSuspended,
|
|
54
|
+
withSuspended: args.options.withSuspended
|
|
51
55
|
});
|
|
52
56
|
});
|
|
53
57
|
}, _VivaEngageNetworkListCommand_initOptions = function _VivaEngageNetworkListCommand_initOptions() {
|
|
54
58
|
this.options.unshift({
|
|
55
59
|
option: '--includeSuspended'
|
|
60
|
+
}, {
|
|
61
|
+
option: '--withSuspended'
|
|
56
62
|
});
|
|
57
63
|
};
|
|
58
64
|
export default new VivaEngageNetworkListCommand();
|
|
@@ -4,6 +4,7 @@ export default {
|
|
|
4
4
|
ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
|
|
5
5
|
ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
|
|
6
6
|
ENGAGE_COMMUNITY_LIST: `${prefix} engage community list`,
|
|
7
|
+
ENGAGE_COMMUNITY_REMOVE: `${prefix} engage community remove`,
|
|
7
8
|
ENGAGE_COMMUNITY_SET: `${prefix} engage community set`,
|
|
8
9
|
ENGAGE_COMMUNITY_USER_ADD: `${prefix} engage community user add`,
|
|
9
10
|
ENGAGE_COMMUNITY_USER_LIST: `${prefix} engage community user list`,
|
|
@@ -22,29 +22,32 @@ m365 entra m365group get [options]
|
|
|
22
22
|
: Display name of the Microsoft 365 Group or Microsoft Teams team to retrieve information for. Specify either `id` or `displayName`, but not both.
|
|
23
23
|
|
|
24
24
|
`--includeSiteUrl`
|
|
25
|
-
: Set to retrieve the site URL for the group
|
|
25
|
+
: (deprecated. Use option `withSiteUrl` instead) Set to retrieve the site URL for the group.
|
|
26
|
+
|
|
27
|
+
`--withSiteUrl`
|
|
28
|
+
: Set to retrieve the site URL for the group.
|
|
26
29
|
```
|
|
27
30
|
|
|
28
31
|
<Global />
|
|
29
32
|
|
|
30
33
|
## Examples
|
|
31
34
|
|
|
32
|
-
Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
|
|
35
|
+
Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_.
|
|
33
36
|
|
|
34
37
|
```sh
|
|
35
38
|
m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844
|
|
36
39
|
```
|
|
37
40
|
|
|
38
|
-
Get information about the Microsoft 365 Group with displayName _Finance_
|
|
41
|
+
Get information about the Microsoft 365 Group with displayName _Finance_.
|
|
39
42
|
|
|
40
43
|
```sh
|
|
41
44
|
m365 entra m365group get --displayName Finance
|
|
42
45
|
```
|
|
43
46
|
|
|
44
|
-
Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_ and also retrieve the URL of the corresponding SharePoint site
|
|
47
|
+
Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_ and also retrieve the URL of the corresponding SharePoint site.
|
|
45
48
|
|
|
46
49
|
```sh
|
|
47
|
-
m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --
|
|
50
|
+
m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --withSiteUrl
|
|
48
51
|
```
|
|
49
52
|
|
|
50
53
|
## Response
|
|
@@ -16,54 +16,56 @@ m365 entra m365group list [options]
|
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-d, --displayName [displayName]`
|
|
19
|
-
: Retrieve only groups with displayName starting with the specified value
|
|
19
|
+
: Retrieve only groups with displayName starting with the specified value.
|
|
20
20
|
|
|
21
21
|
`-m, --mailNickname [displayName]`
|
|
22
|
-
: Retrieve only groups with mailNickname starting with the specified value
|
|
22
|
+
: Retrieve only groups with mailNickname starting with the specified value.
|
|
23
23
|
|
|
24
24
|
`--includeSiteUrl`
|
|
25
|
-
: Set to retrieve the site URL for each group
|
|
25
|
+
: (deprecated. Use option `withSiteUrl` instead) Set to retrieve the site URL for each group.
|
|
26
|
+
|
|
27
|
+
`--withSiteUrl`
|
|
28
|
+
: Set to retrieve the site URL for each group.
|
|
26
29
|
|
|
27
30
|
`--orphaned`
|
|
28
|
-
: Set to only retrieve groups without owners
|
|
31
|
+
: Set to only retrieve groups without owners.
|
|
29
32
|
```
|
|
30
33
|
|
|
31
34
|
<Global />
|
|
32
35
|
|
|
33
36
|
## Remarks
|
|
34
37
|
|
|
35
|
-
Using the `--
|
|
38
|
+
Using the `--withSiteUrl` option, you can retrieve the URL of the site associated with the particular Microsoft 365 Group. If you however retrieve too many groups and will try to get their site URLs, you will most likely get an error as the command will get throttled, issuing too many requests, too frequently. If you get an error, consider narrowing down the result set using the `--displayName` and `--mailNickname` filters.
|
|
36
39
|
|
|
37
40
|
Using the `--orphaned` option, you can retrieve Microsoft 365 Groups without owners.
|
|
38
41
|
|
|
39
42
|
## Examples
|
|
40
43
|
|
|
41
|
-
List all Microsoft 365 Groups in the tenant
|
|
44
|
+
List all Microsoft 365 Groups in the tenant.
|
|
42
45
|
|
|
43
46
|
```sh
|
|
44
47
|
m365 entra m365group list
|
|
45
48
|
```
|
|
46
49
|
|
|
47
|
-
List Microsoft 365 Groups with display name starting with _Project_
|
|
50
|
+
List Microsoft 365 Groups with display name starting with _Project_.
|
|
48
51
|
|
|
49
52
|
```sh
|
|
50
53
|
m365 entra m365group list --displayName Project
|
|
51
54
|
```
|
|
52
55
|
|
|
53
|
-
List Microsoft 365 Groups mail nick name starting with _team_
|
|
56
|
+
List Microsoft 365 Groups mail nick name starting with _team_.
|
|
54
57
|
|
|
55
58
|
```sh
|
|
56
59
|
m365 entra m365group list --mailNickname team
|
|
57
60
|
```
|
|
58
61
|
|
|
59
|
-
List Microsoft 365 Groups with display name starting with _Project_ including
|
|
60
|
-
the URL of the corresponding SharePoint site
|
|
62
|
+
List Microsoft 365 Groups with display name starting with _Project_ including the URL of the corresponding SharePoint site.
|
|
61
63
|
|
|
62
64
|
```sh
|
|
63
|
-
m365 entra m365group list --displayName Project --
|
|
65
|
+
m365 entra m365group list --displayName Project --withSiteUrl
|
|
64
66
|
```
|
|
65
67
|
|
|
66
|
-
List Microsoft 365 Groups without owners
|
|
68
|
+
List Microsoft 365 Groups without owners.
|
|
67
69
|
|
|
68
70
|
```sh
|
|
69
71
|
m365 entra m365group list --orphaned
|
|
@@ -28,6 +28,9 @@ m365 entra pim role assignment eligibility list [options]
|
|
|
28
28
|
: Display name of the group for which to list eligible roles. Specify either `userId`, `userName`, `groupId` or `groupName`. If not specified, all eligible roles will be listed.
|
|
29
29
|
|
|
30
30
|
`--includePrincipalDetails`
|
|
31
|
+
: (deprecated. Use option `withPrincipalDetails` instead) An optional flag to include details of the principals that were eligible for a role.
|
|
32
|
+
|
|
33
|
+
`--withPrincipalDetails`
|
|
31
34
|
: An optional flag to include details of the principals that were eligible for a role.
|
|
32
35
|
```
|
|
33
36
|
|
|
@@ -50,7 +53,7 @@ m365 entra pim role assignment eligibility list --userId '@meID'
|
|
|
50
53
|
Get a list of eligible roles for any user with principal details.
|
|
51
54
|
|
|
52
55
|
```sh
|
|
53
|
-
m365 entra pim role assignment eligibility list --
|
|
56
|
+
m365 entra pim role assignment eligibility list --withPrincipalDetails
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
## Response
|
|
@@ -121,9 +124,9 @@ m365 entra pim role assignment eligibility list --includePrincipalDetails
|
|
|
121
124
|
</TabItem>
|
|
122
125
|
</Tabs>
|
|
123
126
|
|
|
124
|
-
### `
|
|
127
|
+
### `withPrincipalDetails` response
|
|
125
128
|
|
|
126
|
-
When we make use of the option `
|
|
129
|
+
When we make use of the option `withPrincipalDetails` the response will differ.
|
|
127
130
|
|
|
128
131
|
<Tabs>
|
|
129
132
|
<TabItem value="JSON">
|
|
@@ -183,7 +186,7 @@ When we make use of the option `includePrincipalDetails` the response will diffe
|
|
|
183
186
|
<TabItem value="Markdown">
|
|
184
187
|
|
|
185
188
|
```md
|
|
186
|
-
# entra pim role assignment eligibility list --
|
|
189
|
+
# entra pim role assignment eligibility list --withPrincipalDetails "true"
|
|
187
190
|
|
|
188
191
|
Date: 4/8/2024
|
|
189
192
|
|
|
@@ -31,7 +31,10 @@ m365 entra pim role assignment list [options]
|
|
|
31
31
|
: An optional ISO 8601 formatted date filter to search from.
|
|
32
32
|
|
|
33
33
|
`--includePrincipalDetails`
|
|
34
|
-
: An optional flag to include details of the principals that were assigned a role
|
|
34
|
+
: (deprecated. Use option `withPrincipalDetails` instead) An optional flag to include details of the principals that were assigned a role.
|
|
35
|
+
|
|
36
|
+
`--withPrincipalDetails`
|
|
37
|
+
: An optional flag to include details of the principals that were assigned a role.
|
|
35
38
|
```
|
|
36
39
|
|
|
37
40
|
<Global />
|
|
@@ -50,7 +53,7 @@ Get a list of Entra role assignments for the current user.
|
|
|
50
53
|
m365 entra pim role assignment list --userId '@meID'
|
|
51
54
|
```
|
|
52
55
|
|
|
53
|
-
Get a list of Entra role assignments since the first of January 2024
|
|
56
|
+
Get a list of Entra role assignments since the first of January 2024.
|
|
54
57
|
|
|
55
58
|
```sh
|
|
56
59
|
m365 entra pim role assignment list --startDateTime 2024-01-01T00:00:00Z
|
|
@@ -59,7 +62,7 @@ m365 entra pim role assignment list --startDateTime 2024-01-01T00:00:00Z
|
|
|
59
62
|
Get a list of Entra role assignments with principal details.
|
|
60
63
|
|
|
61
64
|
```sh
|
|
62
|
-
m365 entra pim role assignment list --
|
|
65
|
+
m365 entra pim role assignment list --withPrincipalDetails
|
|
63
66
|
```
|
|
64
67
|
|
|
65
68
|
## Response
|
|
@@ -135,9 +138,9 @@ m365 entra pim role assignment list --includePrincipalDetails
|
|
|
135
138
|
</TabItem>
|
|
136
139
|
</Tabs>
|
|
137
140
|
|
|
138
|
-
### `
|
|
141
|
+
### `withPrincipalDetails` response
|
|
139
142
|
|
|
140
|
-
When we make use of the option `
|
|
143
|
+
When we make use of the option `withPrincipalDetails` the response will differ.
|
|
141
144
|
|
|
142
145
|
<Tabs>
|
|
143
146
|
<TabItem value="JSON">
|
|
@@ -201,7 +204,7 @@ When we make use of the option `includePrincipalDetails` the response will diffe
|
|
|
201
204
|
<TabItem value="Markdown">
|
|
202
205
|
|
|
203
206
|
```md
|
|
204
|
-
# entra pim role assignment list --
|
|
207
|
+
# entra pim role assignment list --withPrincipalDetails "true"
|
|
205
208
|
|
|
206
209
|
Date: 3/31/2024
|
|
207
210
|
|