@pnp/cli-microsoft365 11.0.0-beta.1f852eb → 11.0.0-beta.3143306
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/.devproxy/api-specs/sharepoint.yaml +54 -0
- package/.eslintrc.cjs +2 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Command.js +4 -0
- package/dist/config.js +1 -0
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +13 -27
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +18 -43
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +10 -21
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +25 -49
- package/dist/m365/entra/commands/app/app-add.js +14 -2
- package/dist/m365/entra/commands/group/group-member-add.js +6 -27
- package/dist/m365/entra/commands/group/group-member-set.js +5 -26
- package/dist/m365/entra/commands/m365group/m365group-get.js +1 -7
- package/dist/m365/entra/commands/m365group/m365group-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +1 -7
- package/dist/m365/entra/commands/roleassignment/roleassignment-add.js +146 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/flow/commands/environment/environment-get.js +19 -29
- package/dist/m365/flow/commands/flow-list.js +7 -14
- package/dist/m365/flow/commands/run/run-get.js +1 -7
- package/dist/m365/graph/commands/openextension/openextension-add.js +2 -2
- package/dist/m365/graph/commands/openextension/openextension-set.js +2 -6
- package/dist/m365/graph/commands/subscription/subscription-add.js +3 -10
- package/dist/m365/outlook/commands/mail/mail-searchfolder-add.js +85 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/pa/commands/environment/environment-get.js +18 -23
- package/dist/m365/pp/commands/copilot/copilot-get.js +0 -4
- package/dist/m365/pp/commands/copilot/copilot-list.js +0 -4
- package/dist/m365/pp/commands/copilot/copilot-remove.js +0 -4
- package/dist/m365/pp/commands/environment/environment-get.js +19 -26
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +1 -8
- package/dist/m365/pp/commands.js +0 -7
- package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +1 -7
- package/dist/m365/spe/commands/container/container-add.js +1 -3
- package/dist/m365/spe/commands/container/container-list.js +1 -3
- package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +1 -3
- package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +1 -3
- package/dist/m365/spe/commands/container/container-remove.js +1 -3
- package/dist/m365/spe/commands/containertype/containertype-add.js +67 -90
- package/dist/m365/spe/commands/containertype/containertype-get.js +53 -81
- package/dist/m365/spe/commands/containertype/containertype-list.js +8 -19
- package/dist/m365/spe/commands/containertype/containertype-remove.js +27 -5
- package/dist/m365/spfx/commands/project/project-upgrade.js +23 -66
- package/dist/m365/spo/commands/customaction/customaction-list.js +3 -10
- package/dist/m365/spo/commands/file/file-move.js +2 -8
- package/dist/m365/spo/commands/file/file-version-keep.js +78 -0
- package/dist/m365/spo/commands/homesite/homesite-add.js +26 -2
- package/dist/m365/spo/commands/homesite/homesite-get.js +28 -14
- package/dist/m365/spo/commands/homesite/homesite-list.js +1 -12
- package/dist/m365/spo/commands/homesite/homesite-remove.js +6 -34
- package/dist/m365/spo/commands/homesite/homesite-set.js +88 -44
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +4 -13
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +1 -8
- package/dist/m365/spo/commands/list/list-view-add.js +1 -1
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +17 -25
- package/dist/m365/spo/commands/{tenant/tenant-site-archive.js → site/site-archive.js} +14 -14
- package/dist/m365/spo/commands/{tenant/tenant-site-list.js → site/site-list.js} +16 -27
- package/dist/m365/spo/commands/{tenant/tenant-site-membership-list.js → site/site-membership-list.js} +15 -15
- package/dist/m365/spo/commands/{tenant/tenant-site-rename.js → site/site-rename.js} +14 -14
- package/dist/m365/spo/commands/{tenant/tenant-site-unarchive.js → site/site-unarchive.js} +14 -14
- package/dist/m365/spo/commands/term/term-list.js +1 -7
- package/dist/m365/spo/commands.js +5 -7
- package/dist/m365/teams/commands/chat/chat-member-add.js +3 -9
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +5 -12
- package/dist/m365/teams/commands/report/report-pstncalls.js +5 -12
- package/dist/m365/viva/commands/engage/engage-network-list.js +1 -7
- package/dist/m365/viva/commands.js +0 -3
- package/dist/utils/entraAdministrativeUnit.js +1 -1
- package/dist/utils/entraApp.js +15 -0
- package/dist/utils/spe.js +5 -39
- package/docs/docs/cmd/entra/app/app-add.mdx +7 -1
- package/docs/docs/cmd/entra/group/group-member-add.mdx +7 -26
- package/docs/docs/cmd/entra/group/group-member-set.mdx +5 -23
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +0 -3
- package/docs/docs/cmd/entra/m365group/m365group-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +0 -3
- package/docs/docs/cmd/entra/roleassignment/roleassignment-add.mdx +163 -0
- package/docs/docs/cmd/flow/environment/environment-get.mdx +6 -5
- package/docs/docs/cmd/flow/flow-list.mdx +0 -3
- package/docs/docs/cmd/flow/run/run-get.mdx +0 -3
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +0 -3
- package/docs/docs/cmd/outlook/mail/mail-searchfolder-add.mdx +147 -0
- package/docs/docs/cmd/pa/environment/environment-get.mdx +5 -2
- package/docs/docs/cmd/pp/copilot/copilot-get.mdx +0 -6
- package/docs/docs/cmd/pp/copilot/copilot-list.mdx +0 -6
- package/docs/docs/cmd/pp/copilot/copilot-remove.mdx +0 -6
- package/docs/docs/cmd/pp/environment/environment-get.mdx +5 -2
- package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +0 -3
- package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +0 -3
- package/docs/docs/cmd/spe/container/container-activate.mdx +21 -0
- package/docs/docs/cmd/spe/container/container-add.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-get.mdx +20 -1
- package/docs/docs/cmd/spe/container/container-list.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-permission-list.mdx +19 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +31 -0
- package/docs/docs/cmd/spe/container/container-remove.mdx +31 -0
- package/docs/docs/cmd/spe/containertype/containertype-add.mdx +111 -55
- package/docs/docs/cmd/spe/containertype/containertype-get.mdx +69 -38
- package/docs/docs/cmd/spe/containertype/containertype-list.mdx +59 -31
- package/docs/docs/cmd/spe/containertype/containertype-remove.mdx +31 -4
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +18 -5
- package/docs/docs/cmd/spo/file/file-move.mdx +0 -3
- package/docs/docs/cmd/spo/file/file-version-keep.mdx +68 -0
- package/docs/docs/cmd/spo/homesite/homesite-add.mdx +13 -4
- package/docs/docs/cmd/spo/homesite/homesite-get.mdx +44 -23
- package/docs/docs/cmd/spo/homesite/homesite-list.mdx +0 -6
- package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +10 -35
- package/docs/docs/cmd/spo/homesite/homesite-set.mdx +84 -44
- package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +0 -3
- package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +0 -3
- package/docs/docs/cmd/spo/list/list-view-add.mdx +11 -11
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.mdx +18 -18
- package/docs/docs/cmd/spo/{tenant/tenant-site-archive.mdx → site/site-archive.mdx} +4 -4
- package/docs/docs/cmd/spo/{tenant/tenant-site-list.mdx → site/site-list.mdx} +7 -16
- package/docs/docs/cmd/spo/{tenant/tenant-site-membership-list.mdx → site/site-membership-list.mdx} +5 -5
- package/docs/docs/cmd/spo/{tenant/tenant-site-rename.mdx → site/site-rename.mdx} +7 -7
- package/docs/docs/cmd/spo/{tenant/tenant-site-unarchive.mdx → site/site-unarchive.mdx} +4 -4
- package/docs/docs/cmd/spo/term/term-list.mdx +0 -3
- package/docs/docs/cmd/teams/chat/chat-member-add.mdx +2 -5
- package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +25 -44
- package/docs/docs/cmd/teams/report/report-pstncalls.mdx +25 -48
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-user-add.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-user-remove.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-network-list.mdx +0 -3
- package/npm-shrinkwrap.json +51 -51
- package/package.json +12 -12
- package/dist/m365/pp/commands/card/card-clone.js +0 -101
- package/dist/m365/pp/commands/card/card-get.js +0 -89
- package/dist/m365/pp/commands/card/card-list.js +0 -55
- package/dist/m365/pp/commands/card/card-remove.js +0 -105
- package/dist/m365/skype/commands/report/report-activitycounts.js +0 -15
- package/dist/m365/skype/commands/report/report-activityusercounts.js +0 -15
- package/dist/m365/skype/commands/report/report-activityuserdetail.js +0 -15
- package/dist/m365/skype/commands.js +0 -7
- package/dist/m365/spo/commands/mail/mail-send.js +0 -108
- package/dist/m365/spo/commands/tenant/SPOTenantSitePropertiesEnumerable.js +0 -2
- package/dist/m365/spo/commands/tenant/TenantSiteProperties.js +0 -2
- package/dist/m365/viva/commands/engage/engage-group-list.js +0 -93
- package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -73
- package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -88
- package/docs/docs/cmd/pp/card/card-clone.mdx +0 -103
- package/docs/docs/cmd/pp/card/card-get.mdx +0 -212
- package/docs/docs/cmd/pp/card/card-list.mdx +0 -163
- package/docs/docs/cmd/pp/card/card-remove.mdx +0 -86
- package/docs/docs/cmd/skype/report/report-activitycounts.mdx +0 -96
- package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +0 -96
- package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +0 -134
- package/docs/docs/cmd/spo/mail/mail-send.mdx +0 -69
- package/docs/docs/cmd/viva/engage/engage-group-list.mdx +0 -174
- package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +0 -60
- package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +0 -58
package/dist/Command.js
CHANGED
|
@@ -359,6 +359,10 @@ class Command {
|
|
|
359
359
|
const unknownOptions = optionsUtils.getUnknownOptions(options, this.options);
|
|
360
360
|
optionsUtils.addUnknownOptionsToPayload(payload, unknownOptions);
|
|
361
361
|
}
|
|
362
|
+
addUnknownOptionsToPayloadZod(payload, options) {
|
|
363
|
+
const unknownOptions = optionsUtils.getUnknownOptions(options, zod.schemaToOptions(this.schema));
|
|
364
|
+
optionsUtils.addUnknownOptionsToPayload(payload, unknownOptions);
|
|
365
|
+
}
|
|
362
366
|
loadValuesFromAccessToken(args) {
|
|
363
367
|
if (!auth.connection.accessTokens[auth.defaultResource]) {
|
|
364
368
|
return;
|
package/dist/config.js
CHANGED
|
@@ -20,6 +20,7 @@ export default {
|
|
|
20
20
|
'https://graph.microsoft.com/ExternalConnection.ReadWrite.All',
|
|
21
21
|
'https://graph.microsoft.com/ExternalItem.ReadWrite.All',
|
|
22
22
|
'https://graph.microsoft.com/FileStorageContainer.Selected',
|
|
23
|
+
'https://graph.microsoft.com/FileStorageContainerType.Manage.All',
|
|
23
24
|
'https://graph.microsoft.com/Group.ReadWrite.All',
|
|
24
25
|
'https://graph.microsoft.com/IdentityProvider.ReadWrite.All',
|
|
25
26
|
'https://graph.microsoft.com/InformationProtectionPolicy.Read',
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _EntraAdministrativeUnitAddCommand_instances, _EntraAdministrativeUnitAddCommand_initTelemetry, _EntraAdministrativeUnitAddCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from "../../../../request.js";
|
|
4
|
+
import { zod } from '../../../../utils/zod.js';
|
|
8
5
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
9
6
|
import commands from "../../commands.js";
|
|
7
|
+
const options = globalOptionsZod
|
|
8
|
+
.extend({
|
|
9
|
+
displayName: zod.alias('n', z.string()),
|
|
10
|
+
description: zod.alias('d', z.string().optional()),
|
|
11
|
+
hiddenMembership: z.boolean().optional()
|
|
12
|
+
})
|
|
13
|
+
.passthrough();
|
|
10
14
|
class EntraAdministrativeUnitAddCommand extends GraphCommand {
|
|
11
15
|
get name() {
|
|
12
16
|
return commands.ADMINISTRATIVEUNIT_ADD;
|
|
@@ -17,11 +21,8 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
|
|
|
17
21
|
allowUnknownOptions() {
|
|
18
22
|
return true;
|
|
19
23
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_EntraAdministrativeUnitAddCommand_instances.add(this);
|
|
23
|
-
__classPrivateFieldGet(this, _EntraAdministrativeUnitAddCommand_instances, "m", _EntraAdministrativeUnitAddCommand_initTelemetry).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _EntraAdministrativeUnitAddCommand_instances, "m", _EntraAdministrativeUnitAddCommand_initOptions).call(this);
|
|
24
|
+
get schema() {
|
|
25
|
+
return options;
|
|
25
26
|
}
|
|
26
27
|
async commandAction(logger, args) {
|
|
27
28
|
const requestBody = {
|
|
@@ -29,7 +30,7 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
|
|
|
29
30
|
displayName: args.options.displayName,
|
|
30
31
|
visibility: args.options.hiddenMembership ? 'HiddenMembership' : null
|
|
31
32
|
};
|
|
32
|
-
this.
|
|
33
|
+
this.addUnknownOptionsToPayloadZod(requestBody, args.options);
|
|
33
34
|
const requestOptions = {
|
|
34
35
|
url: `${this.resource}/v1.0/directory/administrativeUnits`,
|
|
35
36
|
headers: {
|
|
@@ -47,20 +48,5 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
|
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
_EntraAdministrativeUnitAddCommand_instances = new WeakSet(), _EntraAdministrativeUnitAddCommand_initTelemetry = function _EntraAdministrativeUnitAddCommand_initTelemetry() {
|
|
51
|
-
this.telemetry.push((args) => {
|
|
52
|
-
Object.assign(this.telemetryProperties, {
|
|
53
|
-
hiddenMembership: !!args.options.hiddenMembership
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
}, _EntraAdministrativeUnitAddCommand_initOptions = function _EntraAdministrativeUnitAddCommand_initOptions() {
|
|
57
|
-
this.options.unshift({
|
|
58
|
-
option: '-n, --displayName <displayName>'
|
|
59
|
-
}, {
|
|
60
|
-
option: '-d, --description [description]'
|
|
61
|
-
}, {
|
|
62
|
-
option: '--hiddenMembership'
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
51
|
export default new EntraAdministrativeUnitAddCommand();
|
|
66
52
|
//# sourceMappingURL=administrativeunit-add.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
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 _EntraAdministrativeUnitGetCommand_instances, _EntraAdministrativeUnitGetCommand_initTelemetry, _EntraAdministrativeUnitGetCommand_initOptions, _EntraAdministrativeUnitGetCommand_initValidators, _EntraAdministrativeUnitGetCommand_initOptionSets, _EntraAdministrativeUnitGetCommand_initTypes;
|
|
7
|
-
import { validation } from "../../../../utils/validation.js";
|
|
1
|
+
import { z } from 'zod';
|
|
8
2
|
import request from "../../../../request.js";
|
|
9
3
|
import GraphCommand from "../../../base/GraphCommand.js";
|
|
10
4
|
import commands from "../../commands.js";
|
|
11
5
|
import { entraAdministrativeUnit } from "../../../../utils/entraAdministrativeUnit.js";
|
|
6
|
+
import { globalOptionsZod } from "../../../../Command.js";
|
|
7
|
+
import { zod } from "../../../../utils/zod.js";
|
|
8
|
+
const options = globalOptionsZod
|
|
9
|
+
.extend({
|
|
10
|
+
id: zod.alias('i', z.string().uuid().optional()),
|
|
11
|
+
displayName: zod.alias('n', z.string().optional()),
|
|
12
|
+
properties: zod.alias('p', z.string().optional())
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
12
15
|
class EntraAdministrativeUnitGetCommand extends GraphCommand {
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.ADMINISTRATIVEUNIT_GET;
|
|
@@ -16,14 +19,14 @@ class EntraAdministrativeUnitGetCommand extends GraphCommand {
|
|
|
16
19
|
get description() {
|
|
17
20
|
return 'Gets information about a specific administrative unit';
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
getRefinedSchema(schema) {
|
|
26
|
+
return schema
|
|
27
|
+
.refine(options => [options.id, options.displayName].filter(Boolean).length === 1, {
|
|
28
|
+
message: 'Specify either id or displayName'
|
|
29
|
+
});
|
|
27
30
|
}
|
|
28
31
|
async commandAction(logger, args) {
|
|
29
32
|
let administrativeUnit;
|
|
@@ -62,33 +65,5 @@ class EntraAdministrativeUnitGetCommand extends GraphCommand {
|
|
|
62
65
|
return await request.get(requestOptions);
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
|
-
_EntraAdministrativeUnitGetCommand_instances = new WeakSet(), _EntraAdministrativeUnitGetCommand_initTelemetry = function _EntraAdministrativeUnitGetCommand_initTelemetry() {
|
|
66
|
-
this.telemetry.push((args) => {
|
|
67
|
-
Object.assign(this.telemetryProperties, {
|
|
68
|
-
id: typeof args.options.id !== 'undefined',
|
|
69
|
-
displayName: typeof args.options.displayName !== 'undefined',
|
|
70
|
-
properties: typeof args.options.properties !== 'undefined'
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}, _EntraAdministrativeUnitGetCommand_initOptions = function _EntraAdministrativeUnitGetCommand_initOptions() {
|
|
74
|
-
this.options.unshift({
|
|
75
|
-
option: '-i, --id [id]'
|
|
76
|
-
}, {
|
|
77
|
-
option: '-n, --displayName [displayName]'
|
|
78
|
-
}, {
|
|
79
|
-
option: '-p, --properties [properties]'
|
|
80
|
-
});
|
|
81
|
-
}, _EntraAdministrativeUnitGetCommand_initValidators = function _EntraAdministrativeUnitGetCommand_initValidators() {
|
|
82
|
-
this.validators.push(async (args) => {
|
|
83
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
84
|
-
return `${args.options.id} is not a valid GUID`;
|
|
85
|
-
}
|
|
86
|
-
return true;
|
|
87
|
-
});
|
|
88
|
-
}, _EntraAdministrativeUnitGetCommand_initOptionSets = function _EntraAdministrativeUnitGetCommand_initOptionSets() {
|
|
89
|
-
this.optionSets.push({ options: ['id', 'displayName'] });
|
|
90
|
-
}, _EntraAdministrativeUnitGetCommand_initTypes = function _EntraAdministrativeUnitGetCommand_initTypes() {
|
|
91
|
-
this.types.string.push('displayName');
|
|
92
|
-
};
|
|
93
68
|
export default new EntraAdministrativeUnitGetCommand();
|
|
94
69
|
//# sourceMappingURL=administrativeunit-get.js.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _EntraAdministrativeUnitListCommand_instances, _EntraAdministrativeUnitListCommand_initTelemetry, _EntraAdministrativeUnitListCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
4
|
+
import { zod } from '../../../../utils/zod.js';
|
|
8
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
6
|
import commands from '../../commands.js';
|
|
7
|
+
const options = globalOptionsZod
|
|
8
|
+
.extend({
|
|
9
|
+
properties: zod.alias('p', z.string().optional())
|
|
10
|
+
}).strict();
|
|
10
11
|
class EntraAdministrativeUnitListCommand extends GraphCommand {
|
|
11
12
|
get name() {
|
|
12
13
|
return commands.ADMINISTRATIVEUNIT_LIST;
|
|
@@ -14,15 +15,12 @@ class EntraAdministrativeUnitListCommand extends GraphCommand {
|
|
|
14
15
|
get description() {
|
|
15
16
|
return 'Retrieves a list of administrative units';
|
|
16
17
|
}
|
|
18
|
+
get schema() {
|
|
19
|
+
return options;
|
|
20
|
+
}
|
|
17
21
|
defaultProperties() {
|
|
18
22
|
return ['id', 'displayName', 'visibility'];
|
|
19
23
|
}
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
_EntraAdministrativeUnitListCommand_instances.add(this);
|
|
23
|
-
__classPrivateFieldGet(this, _EntraAdministrativeUnitListCommand_instances, "m", _EntraAdministrativeUnitListCommand_initTelemetry).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _EntraAdministrativeUnitListCommand_instances, "m", _EntraAdministrativeUnitListCommand_initOptions).call(this);
|
|
25
|
-
}
|
|
26
24
|
async commandAction(logger, args) {
|
|
27
25
|
const queryParameters = [];
|
|
28
26
|
if (args.options.properties) {
|
|
@@ -44,14 +42,5 @@ class EntraAdministrativeUnitListCommand extends GraphCommand {
|
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
|
-
_EntraAdministrativeUnitListCommand_instances = new WeakSet(), _EntraAdministrativeUnitListCommand_initTelemetry = function _EntraAdministrativeUnitListCommand_initTelemetry() {
|
|
48
|
-
this.telemetry.push((args) => {
|
|
49
|
-
Object.assign(this.telemetryProperties, {
|
|
50
|
-
properties: typeof args.options.properties !== 'undefined'
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}, _EntraAdministrativeUnitListCommand_initOptions = function _EntraAdministrativeUnitListCommand_initOptions() {
|
|
54
|
-
this.options.unshift({ option: '-p, --properties [properties]' });
|
|
55
|
-
};
|
|
56
45
|
export default new EntraAdministrativeUnitListCommand();
|
|
57
46
|
//# sourceMappingURL=administrativeunit-list.js.map
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
var _EntraAdministrativeUnitRemoveCommand_instances, _EntraAdministrativeUnitRemoveCommand_initTelemetry, _EntraAdministrativeUnitRemoveCommand_initOptions, _EntraAdministrativeUnitRemoveCommand_initOptionSets, _EntraAdministrativeUnitRemoveCommand_initValidators, _EntraAdministrativeUnitRemoveCommand_initTypes;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
4
|
+
import request from '../../../../request.js';
|
|
7
5
|
import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
import { zod } from '../../../../utils/zod.js';
|
|
7
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
const options = globalOptionsZod
|
|
10
|
+
.extend({
|
|
11
|
+
id: zod.alias('i', z.string().uuid().optional()),
|
|
12
|
+
displayName: zod.alias('n', z.string().optional()),
|
|
13
|
+
force: zod.alias('f', z.boolean().optional())
|
|
14
|
+
})
|
|
15
|
+
.strict();
|
|
13
16
|
class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
14
17
|
get name() {
|
|
15
18
|
return commands.ADMINISTRATIVEUNIT_REMOVE;
|
|
@@ -17,14 +20,17 @@ class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
|
17
20
|
get description() {
|
|
18
21
|
return 'Removes an administrative unit';
|
|
19
22
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
|
+
}
|
|
26
|
+
getRefinedSchema(schema) {
|
|
27
|
+
return schema
|
|
28
|
+
.refine(options => options.id || options.displayName, {
|
|
29
|
+
message: 'Specify either id or displayName'
|
|
30
|
+
})
|
|
31
|
+
.refine(options => !(options.id && options.displayName), {
|
|
32
|
+
message: 'Specify either id or displayName but not both'
|
|
33
|
+
});
|
|
28
34
|
}
|
|
29
35
|
async commandAction(logger, args) {
|
|
30
36
|
const removeAdministrativeUnit = async () => {
|
|
@@ -57,35 +63,5 @@ class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
|
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
|
-
_EntraAdministrativeUnitRemoveCommand_instances = new WeakSet(), _EntraAdministrativeUnitRemoveCommand_initTelemetry = function _EntraAdministrativeUnitRemoveCommand_initTelemetry() {
|
|
61
|
-
this.telemetry.push((args) => {
|
|
62
|
-
Object.assign(this.telemetryProperties, {
|
|
63
|
-
id: args.options.id !== 'undefined',
|
|
64
|
-
displayName: args.options.displayName !== 'undefined',
|
|
65
|
-
force: !!args.options.force
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
}, _EntraAdministrativeUnitRemoveCommand_initOptions = function _EntraAdministrativeUnitRemoveCommand_initOptions() {
|
|
69
|
-
this.options.unshift({
|
|
70
|
-
option: '-i, --id [id]'
|
|
71
|
-
}, {
|
|
72
|
-
option: '-n, --displayName [displayName]'
|
|
73
|
-
}, {
|
|
74
|
-
option: '-f, --force'
|
|
75
|
-
});
|
|
76
|
-
}, _EntraAdministrativeUnitRemoveCommand_initOptionSets = function _EntraAdministrativeUnitRemoveCommand_initOptionSets() {
|
|
77
|
-
this.optionSets.push({
|
|
78
|
-
options: ['id', 'displayName']
|
|
79
|
-
});
|
|
80
|
-
}, _EntraAdministrativeUnitRemoveCommand_initValidators = function _EntraAdministrativeUnitRemoveCommand_initValidators() {
|
|
81
|
-
this.validators.push(async (args) => {
|
|
82
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
83
|
-
return `${args.options.id} is not a valid GUID for option id.`;
|
|
84
|
-
}
|
|
85
|
-
return true;
|
|
86
|
-
});
|
|
87
|
-
}, _EntraAdministrativeUnitRemoveCommand_initTypes = function _EntraAdministrativeUnitRemoveCommand_initTypes() {
|
|
88
|
-
this.types.string.push('id', 'displayName');
|
|
89
|
-
};
|
|
90
66
|
export default new EntraAdministrativeUnitRemoveCommand();
|
|
91
67
|
//# sourceMappingURL=administrativeunit-remove.js.map
|
|
@@ -425,7 +425,9 @@ _a = EntraAppAddCommand, _EntraAppAddCommand_instances = new WeakSet(), _EntraAp
|
|
|
425
425
|
certificateBase64Encoded: typeof args.options.certificateBase64Encoded !== 'undefined',
|
|
426
426
|
certificateDisplayName: typeof args.options.certificateDisplayName !== 'undefined',
|
|
427
427
|
grantAdminConsent: typeof args.options.grantAdminConsent !== 'undefined',
|
|
428
|
-
allowPublicClientFlows: typeof args.options.allowPublicClientFlows !== 'undefined'
|
|
428
|
+
allowPublicClientFlows: typeof args.options.allowPublicClientFlows !== 'undefined',
|
|
429
|
+
bundleId: typeof args.options.bundleId !== 'undefined',
|
|
430
|
+
signatureHash: typeof args.options.signatureHash !== 'undefined'
|
|
429
431
|
});
|
|
430
432
|
});
|
|
431
433
|
}, _EntraAppAddCommand_initOptions = function _EntraAppAddCommand_initOptions() {
|
|
@@ -465,6 +467,10 @@ _a = EntraAppAddCommand, _EntraAppAddCommand_instances = new WeakSet(), _EntraAp
|
|
|
465
467
|
option: '--certificateDisplayName [certificateDisplayName]'
|
|
466
468
|
}, {
|
|
467
469
|
option: '--manifest [manifest]'
|
|
470
|
+
}, {
|
|
471
|
+
option: '--bundleId [bundleId]'
|
|
472
|
+
}, {
|
|
473
|
+
option: '--signatureHash [signatureHash]'
|
|
468
474
|
}, {
|
|
469
475
|
option: '--save'
|
|
470
476
|
}, {
|
|
@@ -519,12 +525,18 @@ _a = EntraAppAddCommand, _EntraAppAddCommand_instances = new WeakSet(), _EntraAp
|
|
|
519
525
|
return `Error while parsing the specified manifest: ${e}`;
|
|
520
526
|
}
|
|
521
527
|
}
|
|
528
|
+
if (args.options.platform === 'apple' && !args.options.bundleId) {
|
|
529
|
+
return `When you use platform apple, you'll need to specify bundleId`;
|
|
530
|
+
}
|
|
531
|
+
if (args.options.platform === 'android' && (!args.options.bundleId || !args.options.signatureHash)) {
|
|
532
|
+
return `When you use platform android, you'll need to specify bundleId and signatureHash`;
|
|
533
|
+
}
|
|
522
534
|
return true;
|
|
523
535
|
});
|
|
524
536
|
}, _EntraAppAddCommand_initOptionSets = function _EntraAppAddCommand_initOptionSets() {
|
|
525
537
|
this.optionSets.push({ options: ['name', 'manifest'] });
|
|
526
538
|
};
|
|
527
|
-
EntraAppAddCommand.entraApplicationPlatform = ['spa', 'web', 'publicClient'];
|
|
539
|
+
EntraAppAddCommand.entraApplicationPlatform = ['spa', 'web', 'publicClient', 'apple', 'android'];
|
|
528
540
|
EntraAppAddCommand.entraAppScopeConsentBy = ['admins', 'adminsAndUsers'];
|
|
529
541
|
export default new EntraAppAddCommand();
|
|
530
542
|
//# sourceMappingURL=app-add.js.map
|
|
@@ -29,14 +29,8 @@ class EntraGroupMemberAddCommand extends GraphCommand {
|
|
|
29
29
|
}
|
|
30
30
|
async commandAction(logger, args) {
|
|
31
31
|
try {
|
|
32
|
-
if (args.options.groupDisplayName) {
|
|
33
|
-
await this.warn(logger, `Option 'groupDisplayName' is deprecated and will be removed in the next major release.`);
|
|
34
|
-
}
|
|
35
|
-
if (args.options.ids) {
|
|
36
|
-
await this.warn(logger, `Option 'ids' is deprecated and will be removed in the next major release. Please use 'userIds' instead.`);
|
|
37
|
-
}
|
|
38
32
|
if (this.verbose) {
|
|
39
|
-
await logger.logToStderr(`Adding member(s) ${args.options.
|
|
33
|
+
await logger.logToStderr(`Adding member(s) ${args.options.userIds || args.options.userNames || args.options.subgroupIds || args.options.subgroupNames} to group ${args.options.groupId || args.options.groupName}...`);
|
|
40
34
|
}
|
|
41
35
|
const groupId = await this.getGroupId(logger, args.options);
|
|
42
36
|
const objectIds = await this.getObjectIds(logger, args.options);
|
|
@@ -83,20 +77,17 @@ class EntraGroupMemberAddCommand extends GraphCommand {
|
|
|
83
77
|
return options.groupId;
|
|
84
78
|
}
|
|
85
79
|
if (this.verbose) {
|
|
86
|
-
await logger.logToStderr(`Retrieving ID of group ${options.
|
|
80
|
+
await logger.logToStderr(`Retrieving ID of group ${options.groupName}...`);
|
|
87
81
|
}
|
|
88
|
-
return entraGroup.getGroupIdByDisplayName(options.
|
|
82
|
+
return entraGroup.getGroupIdByDisplayName(options.groupName);
|
|
89
83
|
}
|
|
90
84
|
async getObjectIds(logger, options) {
|
|
91
|
-
if (options.
|
|
85
|
+
if (options.userIds || options.userNames) {
|
|
92
86
|
return this.getUserIds(logger, options);
|
|
93
87
|
}
|
|
94
88
|
return this.getGroupIds(logger, options);
|
|
95
89
|
}
|
|
96
90
|
async getUserIds(logger, options) {
|
|
97
|
-
if (options.ids) {
|
|
98
|
-
return options.ids.split(',').map(i => i.trim());
|
|
99
|
-
}
|
|
100
91
|
if (options.userIds) {
|
|
101
92
|
return options.userIds.split(',').map(i => i.trim());
|
|
102
93
|
}
|
|
@@ -119,9 +110,7 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
|
|
|
119
110
|
this.telemetry.push((args) => {
|
|
120
111
|
Object.assign(this.telemetryProperties, {
|
|
121
112
|
groupId: typeof args.options.groupId !== 'undefined',
|
|
122
|
-
groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
|
|
123
113
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
124
|
-
ids: typeof args.options.ids !== 'undefined',
|
|
125
114
|
userIds: typeof args.options.userIds !== 'undefined',
|
|
126
115
|
userNames: typeof args.options.userNames !== 'undefined',
|
|
127
116
|
subgroupIds: typeof args.options.subgroupIds !== 'undefined',
|
|
@@ -131,12 +120,8 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
|
|
|
131
120
|
}, _EntraGroupMemberAddCommand_initOptions = function _EntraGroupMemberAddCommand_initOptions() {
|
|
132
121
|
this.options.unshift({
|
|
133
122
|
option: '-i, --groupId [groupId]'
|
|
134
|
-
}, {
|
|
135
|
-
option: '--groupDisplayName [groupDisplayName]'
|
|
136
123
|
}, {
|
|
137
124
|
option: '-n, --groupName [groupName]'
|
|
138
|
-
}, {
|
|
139
|
-
option: '--ids [ids]'
|
|
140
125
|
}, {
|
|
141
126
|
option: '--userIds [userIds]'
|
|
142
127
|
}, {
|
|
@@ -154,12 +139,6 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
|
|
|
154
139
|
if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
|
|
155
140
|
return `${args.options.groupId} is not a valid GUID for option groupId.`;
|
|
156
141
|
}
|
|
157
|
-
if (args.options.ids) {
|
|
158
|
-
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.ids);
|
|
159
|
-
if (isValidGUIDArrayResult !== true) {
|
|
160
|
-
return `The following GUIDs are invalid for the option 'ids': ${isValidGUIDArrayResult}.`;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
142
|
if (args.options.userIds) {
|
|
164
143
|
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.userIds);
|
|
165
144
|
if (isValidGUIDArrayResult !== true) {
|
|
@@ -187,9 +166,9 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
|
|
|
187
166
|
return true;
|
|
188
167
|
});
|
|
189
168
|
}, _EntraGroupMemberAddCommand_initOptionSets = function _EntraGroupMemberAddCommand_initOptionSets() {
|
|
190
|
-
this.optionSets.push({ options: ['groupId', '
|
|
169
|
+
this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['userIds', 'userNames', 'subgroupIds', 'subgroupNames'] });
|
|
191
170
|
}, _EntraGroupMemberAddCommand_initTypes = function _EntraGroupMemberAddCommand_initTypes() {
|
|
192
|
-
this.types.string.push('groupId', '
|
|
171
|
+
this.types.string.push('groupId', 'groupName', 'ids', 'userIds', 'userNames', 'subgroupIds', 'subgroupNames', 'role');
|
|
193
172
|
};
|
|
194
173
|
export default new EntraGroupMemberAddCommand();
|
|
195
174
|
//# sourceMappingURL=group-member-add.js.map
|
|
@@ -29,14 +29,8 @@ class EntraGroupMemberSetCommand extends GraphCommand {
|
|
|
29
29
|
}
|
|
30
30
|
async commandAction(logger, args) {
|
|
31
31
|
try {
|
|
32
|
-
if (args.options.groupDisplayName) {
|
|
33
|
-
await this.warn(logger, `Option 'groupDisplayName' is deprecated and will be removed in the next major release.`);
|
|
34
|
-
}
|
|
35
|
-
if (args.options.ids) {
|
|
36
|
-
await this.warn(logger, `Option 'ids' is deprecated and will be removed in the next major release. Please use 'userIds' instead.`);
|
|
37
|
-
}
|
|
38
32
|
if (this.verbose) {
|
|
39
|
-
await logger.logToStderr(`Adding member(s) ${args.options.
|
|
33
|
+
await logger.logToStderr(`Adding member(s) ${args.options.userIds || args.options.userNames} to role ${args.options.role} of group ${args.options.groupId || args.options.groupName}...`);
|
|
40
34
|
}
|
|
41
35
|
const groupId = await this.getGroupId(logger, args.options);
|
|
42
36
|
const userIds = await this.getUserIds(logger, args.options);
|
|
@@ -55,14 +49,11 @@ class EntraGroupMemberSetCommand extends GraphCommand {
|
|
|
55
49
|
return options.groupId;
|
|
56
50
|
}
|
|
57
51
|
if (this.verbose) {
|
|
58
|
-
await logger.logToStderr(`Retrieving ID of group ${options.
|
|
52
|
+
await logger.logToStderr(`Retrieving ID of group ${options.groupName}...`);
|
|
59
53
|
}
|
|
60
|
-
return entraGroup.getGroupIdByDisplayName(options.
|
|
54
|
+
return entraGroup.getGroupIdByDisplayName(options.groupName);
|
|
61
55
|
}
|
|
62
56
|
async getUserIds(logger, options) {
|
|
63
|
-
if (options.ids) {
|
|
64
|
-
return options.ids.split(',').map(i => i.trim());
|
|
65
|
-
}
|
|
66
57
|
if (options.userIds) {
|
|
67
58
|
return options.userIds.split(',').map(i => i.trim());
|
|
68
59
|
}
|
|
@@ -166,9 +157,7 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
|
|
|
166
157
|
this.telemetry.push((args) => {
|
|
167
158
|
Object.assign(this.telemetryProperties, {
|
|
168
159
|
groupId: typeof args.options.groupId !== 'undefined',
|
|
169
|
-
groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
|
|
170
160
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
171
|
-
ids: typeof args.options.ids !== 'undefined',
|
|
172
161
|
userIds: typeof args.options.userIds !== 'undefined',
|
|
173
162
|
userNames: typeof args.options.userNames !== 'undefined'
|
|
174
163
|
});
|
|
@@ -176,12 +165,8 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
|
|
|
176
165
|
}, _EntraGroupMemberSetCommand_initOptions = function _EntraGroupMemberSetCommand_initOptions() {
|
|
177
166
|
this.options.unshift({
|
|
178
167
|
option: '-i, --groupId [groupId]'
|
|
179
|
-
}, {
|
|
180
|
-
option: '--groupDisplayName [groupDisplayName]'
|
|
181
168
|
}, {
|
|
182
169
|
option: '-n, --groupName [groupName]'
|
|
183
|
-
}, {
|
|
184
|
-
option: '--ids [ids]'
|
|
185
170
|
}, {
|
|
186
171
|
option: '--userIds [userIds]'
|
|
187
172
|
}, {
|
|
@@ -195,12 +180,6 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
|
|
|
195
180
|
if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
|
|
196
181
|
return `${args.options.groupId} is not a valid GUID for option groupId.`;
|
|
197
182
|
}
|
|
198
|
-
if (args.options.ids) {
|
|
199
|
-
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.ids);
|
|
200
|
-
if (isValidGUIDArrayResult !== true) {
|
|
201
|
-
return `'${isValidGUIDArrayResult}' is not a valid GUID for option 'ids'.`;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
183
|
if (args.options.userIds) {
|
|
205
184
|
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.userIds);
|
|
206
185
|
if (isValidGUIDArrayResult !== true) {
|
|
@@ -219,9 +198,9 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
|
|
|
219
198
|
return true;
|
|
220
199
|
});
|
|
221
200
|
}, _EntraGroupMemberSetCommand_initOptionSets = function _EntraGroupMemberSetCommand_initOptionSets() {
|
|
222
|
-
this.optionSets.push({ options: ['groupId', '
|
|
201
|
+
this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['userIds', 'userNames'] });
|
|
223
202
|
}, _EntraGroupMemberSetCommand_initTypes = function _EntraGroupMemberSetCommand_initTypes() {
|
|
224
|
-
this.types.string.push('groupId', '
|
|
203
|
+
this.types.string.push('groupId', 'groupName', 'userIds', 'userNames', 'role');
|
|
225
204
|
};
|
|
226
205
|
export default new EntraGroupMemberSetCommand();
|
|
227
206
|
//# sourceMappingURL=group-member-set.js.map
|
|
@@ -26,9 +26,6 @@ class EntraM365GroupGetCommand extends GraphCommand {
|
|
|
26
26
|
__classPrivateFieldGet(this, _EntraM365GroupGetCommand_instances, "m", _EntraM365GroupGetCommand_initTypes).call(this);
|
|
27
27
|
}
|
|
28
28
|
async commandAction(logger, args) {
|
|
29
|
-
if (args.options.includeSiteUrl) {
|
|
30
|
-
await this.warn(logger, `Parameter 'includeSiteUrl' is deprecated. Please use 'withSiteUrl' instead`);
|
|
31
|
-
}
|
|
32
29
|
let group;
|
|
33
30
|
try {
|
|
34
31
|
if (args.options.id) {
|
|
@@ -50,7 +47,7 @@ class EntraM365GroupGetCommand extends GraphCommand {
|
|
|
50
47
|
};
|
|
51
48
|
const groupExtended = await request.get(requestExtendedOptions);
|
|
52
49
|
group = { ...group, ...groupExtended };
|
|
53
|
-
if (args.options.
|
|
50
|
+
if (args.options.withSiteUrl) {
|
|
54
51
|
const requestOptions = {
|
|
55
52
|
url: `${this.resource}/v1.0/groups/${group.id}/drive?$select=webUrl`,
|
|
56
53
|
headers: {
|
|
@@ -71,7 +68,6 @@ class EntraM365GroupGetCommand extends GraphCommand {
|
|
|
71
68
|
_EntraM365GroupGetCommand_instances = new WeakSet(), _EntraM365GroupGetCommand_initTelemetry = function _EntraM365GroupGetCommand_initTelemetry() {
|
|
72
69
|
this.telemetry.push((args) => {
|
|
73
70
|
Object.assign(this.telemetryProperties, {
|
|
74
|
-
includeSiteUrl: !!args.options.includeSiteUrl,
|
|
75
71
|
withSiteUrl: !!args.options.withSiteUrl
|
|
76
72
|
});
|
|
77
73
|
});
|
|
@@ -80,8 +76,6 @@ _EntraM365GroupGetCommand_instances = new WeakSet(), _EntraM365GroupGetCommand_i
|
|
|
80
76
|
option: '-i, --id [id]'
|
|
81
77
|
}, {
|
|
82
78
|
option: '-n, --displayName [displayName]'
|
|
83
|
-
}, {
|
|
84
|
-
option: '--includeSiteUrl'
|
|
85
79
|
}, {
|
|
86
80
|
option: '--withSiteUrl'
|
|
87
81
|
});
|
|
@@ -26,9 +26,6 @@ class EntraM365GroupListCommand extends GraphCommand {
|
|
|
26
26
|
return ['id', 'displayName', 'mailNickname', 'siteUrl'];
|
|
27
27
|
}
|
|
28
28
|
async commandAction(logger, args) {
|
|
29
|
-
if (args.options.includeSiteUrl) {
|
|
30
|
-
await this.warn(logger, `Parameter 'includeSiteUrl' is deprecated. Please use 'withSiteUrl' instead`);
|
|
31
|
-
}
|
|
32
29
|
const groupFilter = `?$filter=groupTypes/any(c:c+eq+'Unified')`;
|
|
33
30
|
const displayNameFilter = args.options.displayName ? ` and startswith(DisplayName,'${formatting.encodeQueryParameter(args.options.displayName)}')` : '';
|
|
34
31
|
const mailNicknameFilter = args.options.mailNickname ? ` and startswith(MailNickname,'${formatting.encodeQueryParameter(args.options.mailNickname)}')` : '';
|
|
@@ -46,7 +43,7 @@ class EntraM365GroupListCommand extends GraphCommand {
|
|
|
46
43
|
});
|
|
47
44
|
groups = orphanedGroups;
|
|
48
45
|
}
|
|
49
|
-
if (args.options.
|
|
46
|
+
if (args.options.withSiteUrl) {
|
|
50
47
|
const res = await Promise.all(groups.map(g => this.getGroupSiteUrl(g.id)));
|
|
51
48
|
res.forEach(r => {
|
|
52
49
|
for (let i = 0; i < groups.length; i++) {
|
|
@@ -84,7 +81,6 @@ _EntraM365GroupListCommand_instances = new WeakSet(), _EntraM365GroupListCommand
|
|
|
84
81
|
Object.assign(this.telemetryProperties, {
|
|
85
82
|
displayName: typeof args.options.displayName !== 'undefined',
|
|
86
83
|
mailNickname: typeof args.options.mailNickname !== 'undefined',
|
|
87
|
-
includeSiteUrl: args.options.includeSiteUrl,
|
|
88
84
|
withSiteUrl: !!args.options.withSiteUrl,
|
|
89
85
|
orphaned: !!args.options.orphaned
|
|
90
86
|
});
|
|
@@ -94,8 +90,6 @@ _EntraM365GroupListCommand_instances = new WeakSet(), _EntraM365GroupListCommand
|
|
|
94
90
|
option: '-d, --displayName [displayName]'
|
|
95
91
|
}, {
|
|
96
92
|
option: '-m, --mailNickname [displayName]'
|
|
97
|
-
}, {
|
|
98
|
-
option: '--includeSiteUrl'
|
|
99
93
|
}, {
|
|
100
94
|
option: '--withSiteUrl'
|
|
101
95
|
}, {
|
|
@@ -29,9 +29,6 @@ class EntraPimRoleAssignmentEligibilityListCommand extends GraphCommand {
|
|
|
29
29
|
__classPrivateFieldGet(this, _EntraPimRoleAssignmentEligibilityListCommand_instances, "m", _EntraPimRoleAssignmentEligibilityListCommand_initOptionSets).call(this);
|
|
30
30
|
}
|
|
31
31
|
async commandAction(logger, args) {
|
|
32
|
-
if (args.options.includePrincipalDetails) {
|
|
33
|
-
await this.warn(logger, `Parameter 'includePrincipalDetails' is deprecated. Please use 'withPrincipalDetails' instead`);
|
|
34
|
-
}
|
|
35
32
|
if (this.verbose) {
|
|
36
33
|
await logger.logToStderr(`Retrieving list of eligible roles for ${args.options.userId || args.options.userName || args.options.groupId || args.options.groupName || 'all users'}...`);
|
|
37
34
|
}
|
|
@@ -43,7 +40,7 @@ class EntraPimRoleAssignmentEligibilityListCommand extends GraphCommand {
|
|
|
43
40
|
queryParameters.push(`$filter=principalId eq '${principalId}'`);
|
|
44
41
|
}
|
|
45
42
|
expands.push('roleDefinition($select=displayName)');
|
|
46
|
-
if (args.options.
|
|
43
|
+
if (args.options.withPrincipalDetails) {
|
|
47
44
|
expands.push('principal');
|
|
48
45
|
}
|
|
49
46
|
queryParameters.push(`$expand=${expands.join(',')}`);
|
|
@@ -89,7 +86,6 @@ _EntraPimRoleAssignmentEligibilityListCommand_instances = new WeakSet(), _EntraP
|
|
|
89
86
|
userName: typeof args.options.userName !== 'undefined',
|
|
90
87
|
groupId: typeof args.options.groupId !== 'undefined',
|
|
91
88
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
92
|
-
includePrincipalDetails: !!args.options.includePrincipalDetails,
|
|
93
89
|
withPrincipalDetails: !!args.options.withPrincipalDetails
|
|
94
90
|
});
|
|
95
91
|
});
|
|
@@ -102,8 +98,6 @@ _EntraPimRoleAssignmentEligibilityListCommand_instances = new WeakSet(), _EntraP
|
|
|
102
98
|
option: '--groupId [groupId]'
|
|
103
99
|
}, {
|
|
104
100
|
option: '--groupName [groupName]'
|
|
105
|
-
}, {
|
|
106
|
-
option: '--includePrincipalDetails'
|
|
107
101
|
}, {
|
|
108
102
|
option: '--withPrincipalDetails'
|
|
109
103
|
});
|