@pnp/cli-microsoft365 11.0.0-beta.4abfd23 → 11.0.0-beta.677f8d3

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.
Files changed (61) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Command.js +0 -4
  4. package/dist/m365/adaptivecard/commands/adaptivecard-send.js +1 -1
  5. package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +27 -13
  6. package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +43 -18
  7. package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +21 -10
  8. package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +49 -25
  9. package/dist/m365/entra/commands/group/group-member-add.js +27 -6
  10. package/dist/m365/entra/commands/group/group-member-set.js +26 -5
  11. package/dist/m365/entra/commands/m365group/m365group-get.js +7 -1
  12. package/dist/m365/entra/commands/m365group/m365group-list.js +7 -1
  13. package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +7 -1
  14. package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +7 -1
  15. package/dist/m365/entra/commands/pim/pim-role-request-list.js +7 -1
  16. package/dist/m365/flow/commands/flow-list.js +14 -7
  17. package/dist/m365/flow/commands/run/run-get.js +7 -1
  18. package/dist/m365/graph/commands/openextension/openextension-add.js +2 -2
  19. package/dist/m365/graph/commands/openextension/openextension-set.js +6 -2
  20. package/dist/m365/graph/commands/subscription/subscription-add.js +10 -3
  21. package/dist/m365/pp/commands/solution/solution-publisher-list.js +8 -1
  22. package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +7 -1
  23. package/dist/m365/spo/commands/file/file-move.js +8 -2
  24. package/dist/m365/spo/commands/hubsite/hubsite-get.js +13 -4
  25. package/dist/m365/spo/commands/hubsite/hubsite-list.js +8 -1
  26. package/dist/m365/spo/commands/tenant/SPOTenantSitePropertiesEnumerable.js +2 -0
  27. package/dist/m365/spo/commands/tenant/TenantSiteProperties.js +2 -0
  28. package/dist/m365/spo/commands/{site/site-archive.js → tenant/tenant-site-archive.js} +14 -14
  29. package/dist/m365/spo/commands/{site/site-list.js → tenant/tenant-site-list.js} +27 -16
  30. package/dist/m365/spo/commands/{site/site-membership-list.js → tenant/tenant-site-membership-list.js} +15 -15
  31. package/dist/m365/spo/commands/{site/site-rename.js → tenant/tenant-site-rename.js} +14 -14
  32. package/dist/m365/spo/commands/{site/site-unarchive.js → tenant/tenant-site-unarchive.js} +14 -14
  33. package/dist/m365/spo/commands/term/term-list.js +7 -1
  34. package/dist/m365/spo/commands.js +5 -4
  35. package/dist/m365/teams/commands/chat/chat-member-add.js +9 -3
  36. package/dist/m365/viva/commands/engage/engage-network-list.js +7 -1
  37. package/docs/docs/cmd/entra/group/group-member-add.mdx +26 -7
  38. package/docs/docs/cmd/entra/group/group-member-set.mdx +23 -5
  39. package/docs/docs/cmd/entra/m365group/m365group-get.mdx +3 -0
  40. package/docs/docs/cmd/entra/m365group/m365group-list.mdx +3 -0
  41. package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +3 -0
  42. package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +3 -0
  43. package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +3 -0
  44. package/docs/docs/cmd/flow/flow-list.mdx +3 -0
  45. package/docs/docs/cmd/flow/run/run-get.mdx +3 -0
  46. package/docs/docs/cmd/graph/subscription/subscription-add.mdx +3 -0
  47. package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +3 -0
  48. package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +3 -0
  49. package/docs/docs/cmd/spo/file/file-move.mdx +3 -0
  50. package/docs/docs/cmd/spo/homesite/homesite-set.mdx +1 -1
  51. package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +3 -0
  52. package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +3 -0
  53. package/docs/docs/cmd/spo/{site/site-archive.mdx → tenant/tenant-site-archive.mdx} +4 -4
  54. package/docs/docs/cmd/spo/{site/site-list.mdx → tenant/tenant-site-list.mdx} +16 -7
  55. package/docs/docs/cmd/spo/{site/site-membership-list.mdx → tenant/tenant-site-membership-list.mdx} +5 -5
  56. package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
  57. package/docs/docs/cmd/spo/{site/site-unarchive.mdx → tenant/tenant-site-unarchive.mdx} +4 -4
  58. package/docs/docs/cmd/spo/term/term-list.mdx +3 -0
  59. package/docs/docs/cmd/teams/chat/chat-member-add.mdx +5 -2
  60. package/docs/docs/cmd/viva/engage/engage-network-list.mdx +3 -0
  61. package/package.json +1 -1
package/dist/Command.js CHANGED
@@ -359,10 +359,6 @@ 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
- }
366
362
  loadValuesFromAccessToken(args) {
367
363
  if (!auth.connection.accessTokens[auth.defaultResource]) {
368
364
  return;
@@ -15,7 +15,7 @@ export const options = globalOptionsZod
15
15
  card: z.string().optional(),
16
16
  cardData: z.string().optional()
17
17
  })
18
- .passthrough();
18
+ .and(z.any());
19
19
  class AdaptiveCardSendCommand extends AnonymousCommand {
20
20
  get name() {
21
21
  return commands.SEND;
@@ -1,16 +1,12 @@
1
- import { z } from 'zod';
2
- import { globalOptionsZod } from '../../../../Command.js';
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 _EntraAdministrativeUnitAddCommand_instances, _EntraAdministrativeUnitAddCommand_initTelemetry, _EntraAdministrativeUnitAddCommand_initOptions;
3
7
  import request from "../../../../request.js";
4
- import { zod } from '../../../../utils/zod.js';
5
8
  import GraphCommand from "../../../base/GraphCommand.js";
6
9
  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();
14
10
  class EntraAdministrativeUnitAddCommand extends GraphCommand {
15
11
  get name() {
16
12
  return commands.ADMINISTRATIVEUNIT_ADD;
@@ -21,8 +17,11 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
21
17
  allowUnknownOptions() {
22
18
  return true;
23
19
  }
24
- get schema() {
25
- return options;
20
+ constructor() {
21
+ super();
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);
26
25
  }
27
26
  async commandAction(logger, args) {
28
27
  const requestBody = {
@@ -30,7 +29,7 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
30
29
  displayName: args.options.displayName,
31
30
  visibility: args.options.hiddenMembership ? 'HiddenMembership' : null
32
31
  };
33
- this.addUnknownOptionsToPayloadZod(requestBody, args.options);
32
+ this.addUnknownOptionsToPayload(requestBody, args.options);
34
33
  const requestOptions = {
35
34
  url: `${this.resource}/v1.0/directory/administrativeUnits`,
36
35
  headers: {
@@ -48,5 +47,20 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
48
47
  }
49
48
  }
50
49
  }
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
+ };
51
65
  export default new EntraAdministrativeUnitAddCommand();
52
66
  //# sourceMappingURL=administrativeunit-add.js.map
@@ -1,17 +1,14 @@
1
- import { z } from 'zod';
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 _EntraAdministrativeUnitGetCommand_instances, _EntraAdministrativeUnitGetCommand_initTelemetry, _EntraAdministrativeUnitGetCommand_initOptions, _EntraAdministrativeUnitGetCommand_initValidators, _EntraAdministrativeUnitGetCommand_initOptionSets, _EntraAdministrativeUnitGetCommand_initTypes;
7
+ import { validation } from "../../../../utils/validation.js";
2
8
  import request from "../../../../request.js";
3
9
  import GraphCommand from "../../../base/GraphCommand.js";
4
10
  import commands from "../../commands.js";
5
11
  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();
15
12
  class EntraAdministrativeUnitGetCommand extends GraphCommand {
16
13
  get name() {
17
14
  return commands.ADMINISTRATIVEUNIT_GET;
@@ -19,14 +16,14 @@ class EntraAdministrativeUnitGetCommand extends GraphCommand {
19
16
  get description() {
20
17
  return 'Gets information about a specific administrative unit';
21
18
  }
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
- });
19
+ constructor() {
20
+ super();
21
+ _EntraAdministrativeUnitGetCommand_instances.add(this);
22
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitGetCommand_instances, "m", _EntraAdministrativeUnitGetCommand_initTelemetry).call(this);
23
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitGetCommand_instances, "m", _EntraAdministrativeUnitGetCommand_initOptions).call(this);
24
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitGetCommand_instances, "m", _EntraAdministrativeUnitGetCommand_initValidators).call(this);
25
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitGetCommand_instances, "m", _EntraAdministrativeUnitGetCommand_initOptionSets).call(this);
26
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitGetCommand_instances, "m", _EntraAdministrativeUnitGetCommand_initTypes).call(this);
30
27
  }
31
28
  async commandAction(logger, args) {
32
29
  let administrativeUnit;
@@ -65,5 +62,33 @@ class EntraAdministrativeUnitGetCommand extends GraphCommand {
65
62
  return await request.get(requestOptions);
66
63
  }
67
64
  }
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
+ };
68
93
  export default new EntraAdministrativeUnitGetCommand();
69
94
  //# sourceMappingURL=administrativeunit-get.js.map
@@ -1,13 +1,12 @@
1
- import { z } from 'zod';
2
- import { globalOptionsZod } from '../../../../Command.js';
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 _EntraAdministrativeUnitListCommand_instances, _EntraAdministrativeUnitListCommand_initTelemetry, _EntraAdministrativeUnitListCommand_initOptions;
3
7
  import { odata } from '../../../../utils/odata.js';
4
- import { zod } from '../../../../utils/zod.js';
5
8
  import GraphCommand from '../../../base/GraphCommand.js';
6
9
  import commands from '../../commands.js';
7
- const options = globalOptionsZod
8
- .extend({
9
- properties: zod.alias('p', z.string().optional())
10
- }).strict();
11
10
  class EntraAdministrativeUnitListCommand extends GraphCommand {
12
11
  get name() {
13
12
  return commands.ADMINISTRATIVEUNIT_LIST;
@@ -15,12 +14,15 @@ class EntraAdministrativeUnitListCommand extends GraphCommand {
15
14
  get description() {
16
15
  return 'Retrieves a list of administrative units';
17
16
  }
18
- get schema() {
19
- return options;
20
- }
21
17
  defaultProperties() {
22
18
  return ['id', 'displayName', 'visibility'];
23
19
  }
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
+ }
24
26
  async commandAction(logger, args) {
25
27
  const queryParameters = [];
26
28
  if (args.options.properties) {
@@ -42,5 +44,14 @@ class EntraAdministrativeUnitListCommand extends GraphCommand {
42
44
  }
43
45
  }
44
46
  }
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
+ };
45
56
  export default new EntraAdministrativeUnitListCommand();
46
57
  //# sourceMappingURL=administrativeunit-list.js.map
@@ -1,18 +1,15 @@
1
- import { z } from 'zod';
2
- import { cli } from '../../../../cli/cli.js';
3
- import { globalOptionsZod } from '../../../../Command.js';
4
- import request from '../../../../request.js';
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 _EntraAdministrativeUnitRemoveCommand_instances, _EntraAdministrativeUnitRemoveCommand_initTelemetry, _EntraAdministrativeUnitRemoveCommand_initOptions, _EntraAdministrativeUnitRemoveCommand_initOptionSets, _EntraAdministrativeUnitRemoveCommand_initValidators, _EntraAdministrativeUnitRemoveCommand_initTypes;
5
7
  import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
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();
8
+ import { validation } from "../../../../utils/validation.js";
9
+ import request from "../../../../request.js";
10
+ import GraphCommand from "../../../base/GraphCommand.js";
11
+ import commands from "../../commands.js";
12
+ import { cli } from "../../../../cli/cli.js";
16
13
  class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
17
14
  get name() {
18
15
  return commands.ADMINISTRATIVEUNIT_REMOVE;
@@ -20,17 +17,14 @@ class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
20
17
  get description() {
21
18
  return 'Removes an administrative unit';
22
19
  }
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
- });
20
+ constructor() {
21
+ super();
22
+ _EntraAdministrativeUnitRemoveCommand_instances.add(this);
23
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitRemoveCommand_instances, "m", _EntraAdministrativeUnitRemoveCommand_initOptions).call(this);
24
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitRemoveCommand_instances, "m", _EntraAdministrativeUnitRemoveCommand_initValidators).call(this);
25
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitRemoveCommand_instances, "m", _EntraAdministrativeUnitRemoveCommand_initOptionSets).call(this);
26
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitRemoveCommand_instances, "m", _EntraAdministrativeUnitRemoveCommand_initTelemetry).call(this);
27
+ __classPrivateFieldGet(this, _EntraAdministrativeUnitRemoveCommand_instances, "m", _EntraAdministrativeUnitRemoveCommand_initTypes).call(this);
34
28
  }
35
29
  async commandAction(logger, args) {
36
30
  const removeAdministrativeUnit = async () => {
@@ -63,5 +57,35 @@ class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
63
57
  }
64
58
  }
65
59
  }
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
+ };
66
90
  export default new EntraAdministrativeUnitRemoveCommand();
67
91
  //# sourceMappingURL=administrativeunit-remove.js.map
@@ -29,8 +29,14 @@ 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
+ }
32
38
  if (this.verbose) {
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}...`);
39
+ await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userIds || args.options.userNames || args.options.subgroupIds || args.options.subgroupNames} to group ${args.options.groupId || args.options.groupDisplayName || args.options.groupName}...`);
34
40
  }
35
41
  const groupId = await this.getGroupId(logger, args.options);
36
42
  const objectIds = await this.getObjectIds(logger, args.options);
@@ -77,17 +83,20 @@ class EntraGroupMemberAddCommand extends GraphCommand {
77
83
  return options.groupId;
78
84
  }
79
85
  if (this.verbose) {
80
- await logger.logToStderr(`Retrieving ID of group ${options.groupName}...`);
86
+ await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName || options.groupName}...`);
81
87
  }
82
- return entraGroup.getGroupIdByDisplayName(options.groupName);
88
+ return entraGroup.getGroupIdByDisplayName(options.groupDisplayName || options.groupName);
83
89
  }
84
90
  async getObjectIds(logger, options) {
85
- if (options.userIds || options.userNames) {
91
+ if (options.ids || options.userIds || options.userNames) {
86
92
  return this.getUserIds(logger, options);
87
93
  }
88
94
  return this.getGroupIds(logger, options);
89
95
  }
90
96
  async getUserIds(logger, options) {
97
+ if (options.ids) {
98
+ return options.ids.split(',').map(i => i.trim());
99
+ }
91
100
  if (options.userIds) {
92
101
  return options.userIds.split(',').map(i => i.trim());
93
102
  }
@@ -110,7 +119,9 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
110
119
  this.telemetry.push((args) => {
111
120
  Object.assign(this.telemetryProperties, {
112
121
  groupId: typeof args.options.groupId !== 'undefined',
122
+ groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
113
123
  groupName: typeof args.options.groupName !== 'undefined',
124
+ ids: typeof args.options.ids !== 'undefined',
114
125
  userIds: typeof args.options.userIds !== 'undefined',
115
126
  userNames: typeof args.options.userNames !== 'undefined',
116
127
  subgroupIds: typeof args.options.subgroupIds !== 'undefined',
@@ -120,8 +131,12 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
120
131
  }, _EntraGroupMemberAddCommand_initOptions = function _EntraGroupMemberAddCommand_initOptions() {
121
132
  this.options.unshift({
122
133
  option: '-i, --groupId [groupId]'
134
+ }, {
135
+ option: '--groupDisplayName [groupDisplayName]'
123
136
  }, {
124
137
  option: '-n, --groupName [groupName]'
138
+ }, {
139
+ option: '--ids [ids]'
125
140
  }, {
126
141
  option: '--userIds [userIds]'
127
142
  }, {
@@ -139,6 +154,12 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
139
154
  if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
140
155
  return `${args.options.groupId} is not a valid GUID for option groupId.`;
141
156
  }
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
+ }
142
163
  if (args.options.userIds) {
143
164
  const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.userIds);
144
165
  if (isValidGUIDArrayResult !== true) {
@@ -166,9 +187,9 @@ _EntraGroupMemberAddCommand_instances = new WeakSet(), _EntraGroupMemberAddComma
166
187
  return true;
167
188
  });
168
189
  }, _EntraGroupMemberAddCommand_initOptionSets = function _EntraGroupMemberAddCommand_initOptionSets() {
169
- this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['userIds', 'userNames', 'subgroupIds', 'subgroupNames'] });
190
+ this.optionSets.push({ options: ['groupId', 'groupDisplayName', 'groupName'] }, { options: ['ids', 'userIds', 'userNames', 'subgroupIds', 'subgroupNames'] });
170
191
  }, _EntraGroupMemberAddCommand_initTypes = function _EntraGroupMemberAddCommand_initTypes() {
171
- this.types.string.push('groupId', 'groupName', 'ids', 'userIds', 'userNames', 'subgroupIds', 'subgroupNames', 'role');
192
+ this.types.string.push('groupId', 'groupDisplayName', 'groupName', 'ids', 'userIds', 'userNames', 'subgroupIds', 'subgroupNames', 'role');
172
193
  };
173
194
  export default new EntraGroupMemberAddCommand();
174
195
  //# sourceMappingURL=group-member-add.js.map
@@ -29,8 +29,14 @@ 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
+ }
32
38
  if (this.verbose) {
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}...`);
39
+ await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userIds || args.options.userNames} to role ${args.options.role} of group ${args.options.groupId || args.options.groupDisplayName || args.options.groupName}...`);
34
40
  }
35
41
  const groupId = await this.getGroupId(logger, args.options);
36
42
  const userIds = await this.getUserIds(logger, args.options);
@@ -49,11 +55,14 @@ class EntraGroupMemberSetCommand extends GraphCommand {
49
55
  return options.groupId;
50
56
  }
51
57
  if (this.verbose) {
52
- await logger.logToStderr(`Retrieving ID of group ${options.groupName}...`);
58
+ await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName || options.groupName}...`);
53
59
  }
54
- return entraGroup.getGroupIdByDisplayName(options.groupName);
60
+ return entraGroup.getGroupIdByDisplayName(options.groupDisplayName || options.groupName);
55
61
  }
56
62
  async getUserIds(logger, options) {
63
+ if (options.ids) {
64
+ return options.ids.split(',').map(i => i.trim());
65
+ }
57
66
  if (options.userIds) {
58
67
  return options.userIds.split(',').map(i => i.trim());
59
68
  }
@@ -157,7 +166,9 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
157
166
  this.telemetry.push((args) => {
158
167
  Object.assign(this.telemetryProperties, {
159
168
  groupId: typeof args.options.groupId !== 'undefined',
169
+ groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
160
170
  groupName: typeof args.options.groupName !== 'undefined',
171
+ ids: typeof args.options.ids !== 'undefined',
161
172
  userIds: typeof args.options.userIds !== 'undefined',
162
173
  userNames: typeof args.options.userNames !== 'undefined'
163
174
  });
@@ -165,8 +176,12 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
165
176
  }, _EntraGroupMemberSetCommand_initOptions = function _EntraGroupMemberSetCommand_initOptions() {
166
177
  this.options.unshift({
167
178
  option: '-i, --groupId [groupId]'
179
+ }, {
180
+ option: '--groupDisplayName [groupDisplayName]'
168
181
  }, {
169
182
  option: '-n, --groupName [groupName]'
183
+ }, {
184
+ option: '--ids [ids]'
170
185
  }, {
171
186
  option: '--userIds [userIds]'
172
187
  }, {
@@ -180,6 +195,12 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
180
195
  if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
181
196
  return `${args.options.groupId} is not a valid GUID for option groupId.`;
182
197
  }
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
+ }
183
204
  if (args.options.userIds) {
184
205
  const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.userIds);
185
206
  if (isValidGUIDArrayResult !== true) {
@@ -198,9 +219,9 @@ _EntraGroupMemberSetCommand_instances = new WeakSet(), _EntraGroupMemberSetComma
198
219
  return true;
199
220
  });
200
221
  }, _EntraGroupMemberSetCommand_initOptionSets = function _EntraGroupMemberSetCommand_initOptionSets() {
201
- this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['userIds', 'userNames'] });
222
+ this.optionSets.push({ options: ['groupId', 'groupDisplayName', 'groupName'] }, { options: ['ids', 'userIds', 'userNames'] });
202
223
  }, _EntraGroupMemberSetCommand_initTypes = function _EntraGroupMemberSetCommand_initTypes() {
203
- this.types.string.push('groupId', 'groupName', 'userIds', 'userNames', 'role');
224
+ this.types.string.push('groupId', 'groupDisplayName', 'groupName', 'ids', 'userIds', 'userNames', 'role');
204
225
  };
205
226
  export default new EntraGroupMemberSetCommand();
206
227
  //# sourceMappingURL=group-member-set.js.map
@@ -26,6 +26,9 @@ 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
+ }
29
32
  let group;
30
33
  try {
31
34
  if (args.options.id) {
@@ -47,7 +50,7 @@ class EntraM365GroupGetCommand extends GraphCommand {
47
50
  };
48
51
  const groupExtended = await request.get(requestExtendedOptions);
49
52
  group = { ...group, ...groupExtended };
50
- if (args.options.withSiteUrl) {
53
+ if (args.options.includeSiteUrl || args.options.withSiteUrl) {
51
54
  const requestOptions = {
52
55
  url: `${this.resource}/v1.0/groups/${group.id}/drive?$select=webUrl`,
53
56
  headers: {
@@ -68,6 +71,7 @@ class EntraM365GroupGetCommand extends GraphCommand {
68
71
  _EntraM365GroupGetCommand_instances = new WeakSet(), _EntraM365GroupGetCommand_initTelemetry = function _EntraM365GroupGetCommand_initTelemetry() {
69
72
  this.telemetry.push((args) => {
70
73
  Object.assign(this.telemetryProperties, {
74
+ includeSiteUrl: !!args.options.includeSiteUrl,
71
75
  withSiteUrl: !!args.options.withSiteUrl
72
76
  });
73
77
  });
@@ -76,6 +80,8 @@ _EntraM365GroupGetCommand_instances = new WeakSet(), _EntraM365GroupGetCommand_i
76
80
  option: '-i, --id [id]'
77
81
  }, {
78
82
  option: '-n, --displayName [displayName]'
83
+ }, {
84
+ option: '--includeSiteUrl'
79
85
  }, {
80
86
  option: '--withSiteUrl'
81
87
  });
@@ -26,6 +26,9 @@ 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
+ }
29
32
  const groupFilter = `?$filter=groupTypes/any(c:c+eq+'Unified')`;
30
33
  const displayNameFilter = args.options.displayName ? ` and startswith(DisplayName,'${formatting.encodeQueryParameter(args.options.displayName)}')` : '';
31
34
  const mailNicknameFilter = args.options.mailNickname ? ` and startswith(MailNickname,'${formatting.encodeQueryParameter(args.options.mailNickname)}')` : '';
@@ -43,7 +46,7 @@ class EntraM365GroupListCommand extends GraphCommand {
43
46
  });
44
47
  groups = orphanedGroups;
45
48
  }
46
- if (args.options.withSiteUrl) {
49
+ if (args.options.includeSiteUrl || args.options.withSiteUrl) {
47
50
  const res = await Promise.all(groups.map(g => this.getGroupSiteUrl(g.id)));
48
51
  res.forEach(r => {
49
52
  for (let i = 0; i < groups.length; i++) {
@@ -81,6 +84,7 @@ _EntraM365GroupListCommand_instances = new WeakSet(), _EntraM365GroupListCommand
81
84
  Object.assign(this.telemetryProperties, {
82
85
  displayName: typeof args.options.displayName !== 'undefined',
83
86
  mailNickname: typeof args.options.mailNickname !== 'undefined',
87
+ includeSiteUrl: args.options.includeSiteUrl,
84
88
  withSiteUrl: !!args.options.withSiteUrl,
85
89
  orphaned: !!args.options.orphaned
86
90
  });
@@ -90,6 +94,8 @@ _EntraM365GroupListCommand_instances = new WeakSet(), _EntraM365GroupListCommand
90
94
  option: '-d, --displayName [displayName]'
91
95
  }, {
92
96
  option: '-m, --mailNickname [displayName]'
97
+ }, {
98
+ option: '--includeSiteUrl'
93
99
  }, {
94
100
  option: '--withSiteUrl'
95
101
  }, {
@@ -29,6 +29,9 @@ 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
+ }
32
35
  if (this.verbose) {
33
36
  await logger.logToStderr(`Retrieving list of eligible roles for ${args.options.userId || args.options.userName || args.options.groupId || args.options.groupName || 'all users'}...`);
34
37
  }
@@ -40,7 +43,7 @@ class EntraPimRoleAssignmentEligibilityListCommand extends GraphCommand {
40
43
  queryParameters.push(`$filter=principalId eq '${principalId}'`);
41
44
  }
42
45
  expands.push('roleDefinition($select=displayName)');
43
- if (args.options.withPrincipalDetails) {
46
+ if (args.options.includePrincipalDetails || args.options.withPrincipalDetails) {
44
47
  expands.push('principal');
45
48
  }
46
49
  queryParameters.push(`$expand=${expands.join(',')}`);
@@ -86,6 +89,7 @@ _EntraPimRoleAssignmentEligibilityListCommand_instances = new WeakSet(), _EntraP
86
89
  userName: typeof args.options.userName !== 'undefined',
87
90
  groupId: typeof args.options.groupId !== 'undefined',
88
91
  groupName: typeof args.options.groupName !== 'undefined',
92
+ includePrincipalDetails: !!args.options.includePrincipalDetails,
89
93
  withPrincipalDetails: !!args.options.withPrincipalDetails
90
94
  });
91
95
  });
@@ -98,6 +102,8 @@ _EntraPimRoleAssignmentEligibilityListCommand_instances = new WeakSet(), _EntraP
98
102
  option: '--groupId [groupId]'
99
103
  }, {
100
104
  option: '--groupName [groupName]'
105
+ }, {
106
+ option: '--includePrincipalDetails'
101
107
  }, {
102
108
  option: '--withPrincipalDetails'
103
109
  });
@@ -30,6 +30,9 @@ class EntraPimRoleAssignmentListCommand extends GraphCommand {
30
30
  const filters = [];
31
31
  const expands = [];
32
32
  try {
33
+ if (args.options.includePrincipalDetails) {
34
+ await this.warn(logger, `Parameter 'includePrincipalDetails' is deprecated. Please use 'withPrincipalDetails' instead`);
35
+ }
33
36
  const principalId = await this.getPrincipalId(logger, args.options);
34
37
  if (principalId) {
35
38
  filters.push(`principalId eq '${principalId}'`);
@@ -41,7 +44,7 @@ class EntraPimRoleAssignmentListCommand extends GraphCommand {
41
44
  queryParameters.push(`$filter=${filters.join(' and ')}`);
42
45
  }
43
46
  expands.push('roleDefinition($select=displayName)');
44
- if (args.options.withPrincipalDetails) {
47
+ if (args.options.includePrincipalDetails || args.options.withPrincipalDetails) {
45
48
  expands.push('principal');
46
49
  }
47
50
  queryParameters.push(`$expand=${expands.join(',')}`);
@@ -82,6 +85,7 @@ _EntraPimRoleAssignmentListCommand_instances = new WeakSet(), _EntraPimRoleAssig
82
85
  groupId: typeof args.options.groupId !== 'undefined',
83
86
  groupName: typeof args.options.groupName !== 'undefined',
84
87
  startDateTime: typeof args.options.startDateTime !== 'undefined',
88
+ includePrincipalDetails: !!args.options.includePrincipalDetails,
85
89
  withPrincipalDetails: !!args.options.withPrincipalDetails
86
90
  });
87
91
  });
@@ -96,6 +100,8 @@ _EntraPimRoleAssignmentListCommand_instances = new WeakSet(), _EntraPimRoleAssig
96
100
  option: "--groupName [groupName]"
97
101
  }, {
98
102
  option: "-s, --startDateTime [startDateTime]"
103
+ }, {
104
+ option: "--includePrincipalDetails"
99
105
  }, {
100
106
  option: "--withPrincipalDetails"
101
107
  });