@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
@@ -30,6 +30,9 @@ class EntraPimRoleRequestListCommand extends GraphCommand {
30
30
  __classPrivateFieldGet(this, _EntraPimRoleRequestListCommand_instances, "m", _EntraPimRoleRequestListCommand_initOptionSets).call(this);
31
31
  }
32
32
  async commandAction(logger, args) {
33
+ if (args.options.includePrincipalDetails) {
34
+ await this.warn(logger, `Parameter 'includePrincipalDetails' is deprecated. Please use 'withPrincipalDetails' instead`);
35
+ }
33
36
  if (this.verbose) {
34
37
  await logger.logToStderr(`Retrieving list of PIM roles requests for ${args.options.userId || args.options.userName || args.options.groupId || args.options.groupName || 'all users'}...`);
35
38
  }
@@ -51,7 +54,7 @@ class EntraPimRoleRequestListCommand extends GraphCommand {
51
54
  queryParameters.push(`$filter=${filters.join(' and ')}`);
52
55
  }
53
56
  expands.push('roleDefinition($select=displayName)');
54
- if (args.options.withPrincipalDetails) {
57
+ if (args.options.includePrincipalDetails || args.options.withPrincipalDetails) {
55
58
  expands.push('principal');
56
59
  }
57
60
  queryParameters.push(`$expand=${expands.join(',')}`);
@@ -100,6 +103,7 @@ _EntraPimRoleRequestListCommand_instances = new WeakSet(), _EntraPimRoleRequestL
100
103
  groupName: typeof args.options.groupName !== 'undefined',
101
104
  createdDateTime: typeof args.options.createdDateTime !== 'undefined',
102
105
  status: typeof args.options.status !== 'undefined',
106
+ includePrincipalDetails: !!args.options.includePrincipalDetails,
103
107
  withPrincipalDetails: !!args.options.withPrincipalDetails
104
108
  });
105
109
  });
@@ -117,6 +121,8 @@ _EntraPimRoleRequestListCommand_instances = new WeakSet(), _EntraPimRoleRequestL
117
121
  }, {
118
122
  option: '-s, --status [status]',
119
123
  autocomplete: this.allowedStatuses
124
+ }, {
125
+ option: '--includePrincipalDetails'
120
126
  }, {
121
127
  option: '--withPrincipalDetails'
122
128
  });
@@ -28,29 +28,33 @@ class FlowListCommand extends PowerAutomateCommand {
28
28
  __classPrivateFieldGet(this, _FlowListCommand_instances, "m", _FlowListCommand_initTypes).call(this);
29
29
  }
30
30
  async commandAction(logger, args) {
31
+ if (args.options.includeSolutions) {
32
+ await this.warn(logger, `Parameter 'includeSolutions' is deprecated. Please use 'withSolutions' instead`);
33
+ }
31
34
  if (this.verbose) {
32
35
  await logger.logToStderr(`Getting Power Automate flows${args.options.asAdmin ? ' as admin' : ''} in environment '${args.options.environmentName}'...`);
33
36
  }
34
37
  try {
35
- const { environmentName, asAdmin, sharingStatus, withSolutions } = args.options;
38
+ const { environmentName, asAdmin, sharingStatus, includeSolutions, withSolutions } = args.options;
36
39
  let items = [];
40
+ const shouldIncludeSolutions = withSolutions || includeSolutions;
37
41
  if (sharingStatus === 'personal') {
38
- const url = this.getApiUrl(environmentName, asAdmin, withSolutions, 'personal');
42
+ const url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'personal');
39
43
  items = await odata.getAllItems(url);
40
44
  }
41
45
  else if (sharingStatus === 'sharedWithMe') {
42
- const url = this.getApiUrl(environmentName, asAdmin, withSolutions, 'team');
46
+ const url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'team');
43
47
  items = await odata.getAllItems(url);
44
48
  }
45
49
  else if (sharingStatus === 'all') {
46
- let url = this.getApiUrl(environmentName, asAdmin, withSolutions, 'personal');
50
+ let url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'personal');
47
51
  items = await odata.getAllItems(url);
48
- url = this.getApiUrl(environmentName, asAdmin, withSolutions, 'team');
52
+ url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'team');
49
53
  const teamFlows = await odata.getAllItems(url);
50
54
  items = items.concat(teamFlows);
51
55
  }
52
56
  else {
53
- const url = this.getApiUrl(environmentName, asAdmin, withSolutions);
57
+ const url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions);
54
58
  items = await odata.getAllItems(url);
55
59
  }
56
60
  // Remove duplicates
@@ -80,6 +84,7 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
80
84
  this.telemetry.push((args) => {
81
85
  Object.assign(this.telemetryProperties, {
82
86
  sharingStatus: typeof args.options.sharingStatus !== 'undefined',
87
+ includeSolutions: !!args.options.includeSolutions,
83
88
  withSolutions: !!args.options.withSolutions,
84
89
  asAdmin: !!args.options.asAdmin
85
90
  });
@@ -90,6 +95,8 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
90
95
  }, {
91
96
  option: '--sharingStatus [sharingStatus]',
92
97
  autocomplete: this.allowedSharingStatuses
98
+ }, {
99
+ option: '--includeSolutions'
93
100
  }, {
94
101
  option: '--withSolutions'
95
102
  }, {
@@ -107,7 +114,7 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
107
114
  });
108
115
  }, _FlowListCommand_initTypes = function _FlowListCommand_initTypes() {
109
116
  this.types.string.push('environmentName', 'sharingStatus');
110
- this.types.boolean.push('withSolutions', 'asAdmin');
117
+ this.types.boolean.push('includeSolutions', 'withSolutions', 'asAdmin');
111
118
  };
112
119
  export default new FlowListCommand();
113
120
  //# sourceMappingURL=flow-list.js.map
@@ -27,6 +27,9 @@ class FlowRunGetCommand extends PowerAutomateCommand {
27
27
  if (this.verbose) {
28
28
  await logger.logToStderr(`Retrieving information about run ${args.options.name} of Microsoft Flow ${args.options.flowName}...`);
29
29
  }
30
+ if (args.options.includeTriggerInformation) {
31
+ await this.warn(logger, `Parameter 'includeTriggerInformation' is deprecated. Please use 'withTrigger' instead`);
32
+ }
30
33
  const actionsParameter = args.options.withActions ? '$expand=properties%2Factions&' : '';
31
34
  const requestOptions = {
32
35
  url: `${PowerAutomateCommand.resource}/providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/runs/${formatting.encodeQueryParameter(args.options.name)}?${actionsParameter}api-version=2016-11-01`,
@@ -41,7 +44,7 @@ class FlowRunGetCommand extends PowerAutomateCommand {
41
44
  res.endTime = res.properties.endTime || '';
42
45
  res.status = res.properties.status;
43
46
  res.triggerName = res.properties.trigger.name;
44
- if (args.options.withTrigger && res.properties.trigger.outputsLink) {
47
+ if ((args.options.includeTriggerInformation || args.options.withTrigger) && res.properties.trigger.outputsLink) {
45
48
  res.triggerInformation = await this.getTriggerInformation(res);
46
49
  }
47
50
  if (!!args.options.withActions) {
@@ -93,6 +96,8 @@ _FlowRunGetCommand_instances = new WeakSet(), _FlowRunGetCommand_initOptions = f
93
96
  option: '--flowName <flowName>'
94
97
  }, {
95
98
  option: '-e, --environmentName <environmentName>'
99
+ }, {
100
+ option: '--includeTriggerInformation'
96
101
  }, {
97
102
  option: '--withTrigger'
98
103
  }, {
@@ -111,6 +116,7 @@ _FlowRunGetCommand_instances = new WeakSet(), _FlowRunGetCommand_initOptions = f
111
116
  }, _FlowRunGetCommand_initTelemetry = function _FlowRunGetCommand_initTelemetry() {
112
117
  this.telemetry.push((args) => {
113
118
  Object.assign(this.telemetryProperties, {
119
+ includeTriggerInformation: !!args.options.includeTriggerInformation,
114
120
  withTrigger: !!args.options.withTrigger,
115
121
  withActions: typeof args.options.withActions !== 'undefined'
116
122
  });
@@ -12,7 +12,7 @@ const options = globalOptionsZod
12
12
  resourceId: zod.alias('i', z.string()),
13
13
  resourceType: zod.alias('t', z.enum(['user', 'group', 'device', 'organization']))
14
14
  })
15
- .passthrough();
15
+ .and(z.any());
16
16
  class GraphOpenExtensionAddCommand extends GraphCommand {
17
17
  get name() {
18
18
  return commands.OPENEXTENSION_ADD;
@@ -38,7 +38,7 @@ class GraphOpenExtensionAddCommand extends GraphCommand {
38
38
  try {
39
39
  const requestBody = {};
40
40
  requestBody["extensionName"] = args.options.name;
41
- const unknownOptions = optionsUtils.getUnknownOptions(args.options, zod.schemaToOptions(this.schema));
41
+ const unknownOptions = optionsUtils.getUnknownOptions(args.options, this.options);
42
42
  const unknownOptionsNames = Object.getOwnPropertyNames(unknownOptions);
43
43
  unknownOptionsNames.forEach(async (o) => {
44
44
  try {
@@ -13,10 +13,11 @@ const options = globalOptionsZod
13
13
  resourceType: zod.alias('t', z.enum(['user', 'group', 'device', 'organization'])),
14
14
  keepUnchangedProperties: zod.alias('k', z.boolean().optional())
15
15
  })
16
- .passthrough();
16
+ .and(z.any());
17
17
  class GraphOpenExtensionSetCommand extends GraphCommand {
18
18
  constructor() {
19
19
  super(...arguments);
20
+ this.commandOptions = ['keepUnchangedProperties', 'resourceType', 'resourceId', 'name'];
20
21
  this.defaultOpenExtensionProperties = ['id', 'extensionName'];
21
22
  }
22
23
  get name() {
@@ -45,9 +46,12 @@ class GraphOpenExtensionSetCommand extends GraphCommand {
45
46
  const currentExtensionNames = Object.getOwnPropertyNames(currentExtension);
46
47
  const requestBody = {};
47
48
  requestBody["@odata.type"] = '#microsoft.graph.openTypeExtension';
48
- const unknownOptions = optionsUtils.getUnknownOptions(args.options, zod.schemaToOptions(this.schema));
49
+ const unknownOptions = optionsUtils.getUnknownOptions(args.options, this.options);
49
50
  const unknownOptionsNames = Object.getOwnPropertyNames(unknownOptions);
50
51
  unknownOptionsNames.forEach(async (option) => {
52
+ if (this.commandOptions.includes(option)) {
53
+ return;
54
+ }
51
55
  const value = unknownOptions[option];
52
56
  if (value === "") {
53
57
  requestBody[option] = null;
@@ -49,7 +49,7 @@ class GraphSubscriptionAddCommand extends GraphCommand {
49
49
  notificationUrl: args.options.notificationUrl,
50
50
  expirationDateTime: await this.getExpirationDateTimeOrDefault(logger, args),
51
51
  clientState: args.options.clientState,
52
- includeResourceData: args.options.withResourceData,
52
+ includeResourceData: args.options.withResourceData || args.options.includeResourceData,
53
53
  encryptionCertificate: args.options.encryptionCertificate,
54
54
  encryptionCertificateId: args.options.encryptionCertificateId,
55
55
  lifecycleNotificationUrl: args.options.lifecycleNotificationUrl,
@@ -66,6 +66,9 @@ class GraphSubscriptionAddCommand extends GraphCommand {
66
66
  responseType: 'json'
67
67
  };
68
68
  try {
69
+ if (args.options.includeResourceData) {
70
+ await this.warn(logger, `Parameter 'includeResourceData' is deprecated. Please use 'withResourceData' instead`);
71
+ }
69
72
  const res = await request.post(requestOptions);
70
73
  await logger.log(res);
71
74
  }
@@ -132,6 +135,7 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
132
135
  lifecycleNotificationUrl: typeof args.options.lifecycleNotificationUrl !== 'undefined',
133
136
  notificationUrlAppId: typeof args.options.notificationUrlAppId !== 'undefined',
134
137
  latestTLSVersion: typeof args.options.latestTLSVersion !== 'undefined',
138
+ includeResourceData: !!args.options.includeResourceData,
135
139
  withResourceData: !!args.options.withResourceData,
136
140
  encryptionCertificate: typeof args.options.encryptionCertificate !== 'undefined',
137
141
  encryptionCertificateId: typeof args.options.encryptionCertificateId !== 'undefined'
@@ -156,6 +160,8 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
156
160
  }, {
157
161
  option: '--latestTLSVersion [latestTLSVersion]',
158
162
  autocomplete: this.allowedTlsVersions
163
+ }, {
164
+ option: '--includeResourceData [includeResourceData]'
159
165
  }, {
160
166
  option: '--withResourceData [withResourceData]'
161
167
  }, {
@@ -187,10 +193,11 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
187
193
  if (args.options.latestTLSVersion && this.allowedTlsVersions.map(x => x.toLowerCase()).indexOf(args.options.latestTLSVersion.toLowerCase()) === -1) {
188
194
  return `${args.options.latestTLSVersion} is not a valid TLS version. Allowed values are ${this.allowedTlsVersions.join(', ')}`;
189
195
  }
190
- if (args.options.withResourceData && !args.options.encryptionCertificate) {
196
+ const shouldIncludeResourceData = args.options.includeResourceData || args.options.withResourceData;
197
+ if (shouldIncludeResourceData && !args.options.encryptionCertificate) {
191
198
  return `The 'encryptionCertificate' options is required to include the changed resource data`;
192
199
  }
193
- if (args.options.withResourceData && !args.options.encryptionCertificateId) {
200
+ if (shouldIncludeResourceData && !args.options.encryptionCertificateId) {
194
201
  return `The 'encryptionCertificateId' options is required to include the changed resource data`;
195
202
  }
196
203
  if (args.options.notificationUrlAppId && !validation.isValidGuid(args.options.notificationUrlAppId)) {
@@ -25,13 +25,17 @@ class PpSolutionPublisherListCommand extends PowerPlatformCommand {
25
25
  __classPrivateFieldGet(this, _PpSolutionPublisherListCommand_instances, "m", _PpSolutionPublisherListCommand_initOptions).call(this);
26
26
  }
27
27
  async commandAction(logger, args) {
28
+ if (args.options.includeMicrosoftPublishers) {
29
+ await this.warn(logger, `Parameter 'includeMicrosoftPublishers' is deprecated. Please use 'withMicrosoftPublishers' instead`);
30
+ }
28
31
  if (this.verbose) {
29
32
  await logger.logToStderr(`Retrieving list of publishers...`);
30
33
  }
31
34
  try {
32
35
  const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
36
+ const shouldIncludeMicrosoftPublishers = args.options.withMicrosoftPublishers || args.options.includeMicrosoftPublishers;
33
37
  const requestOptions = {
34
- url: `${dynamicsApiUrl}/api/data/v9.0/publishers?$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix${!args.options.withMicrosoftPublishers ? `&$filter=publisherid ne 'd21aab70-79e7-11dd-8874-00188b01e34f'` : ''}&api-version=9.1`,
38
+ url: `${dynamicsApiUrl}/api/data/v9.0/publishers?$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix${!shouldIncludeMicrosoftPublishers ? `&$filter=publisherid ne 'd21aab70-79e7-11dd-8874-00188b01e34f'` : ''}&api-version=9.1`,
35
39
  headers: {
36
40
  accept: 'application/json;odata.metadata=none'
37
41
  },
@@ -48,6 +52,7 @@ class PpSolutionPublisherListCommand extends PowerPlatformCommand {
48
52
  _PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherListCommand_initTelemetry = function _PpSolutionPublisherListCommand_initTelemetry() {
49
53
  this.telemetry.push((args) => {
50
54
  Object.assign(this.telemetryProperties, {
55
+ includeMicrosoftPublishers: typeof args.options.includeMicrosoftPublishers !== 'undefined',
51
56
  withMicrosoftPublishers: typeof args.options.withMicrosoftPublishers !== 'undefined',
52
57
  asAdmin: !!args.options.asAdmin
53
58
  });
@@ -55,6 +60,8 @@ _PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherL
55
60
  }, _PpSolutionPublisherListCommand_initOptions = function _PpSolutionPublisherListCommand_initOptions() {
56
61
  this.options.unshift({
57
62
  option: '-e, --environmentName <environmentName>'
63
+ }, {
64
+ option: '--includeMicrosoftPublishers'
58
65
  }, {
59
66
  option: '--withMicrosoftPublishers'
60
67
  }, {
@@ -24,11 +24,15 @@ class PurviewThreatAssessmentGetCommand extends GraphCommand {
24
24
  }
25
25
  async commandAction(logger, args) {
26
26
  try {
27
+ if (args.options.includeResults) {
28
+ await this.warn(logger, `Parameter 'includeResults' is deprecated. Please use 'withResults' instead`);
29
+ }
27
30
  if (this.verbose) {
28
31
  await logger.logToStderr(`Retrieving threat assessment with id ${args.options.id}`);
29
32
  }
33
+ const shouldIncludeResults = args.options.includeResults || args.options.withResults;
30
34
  const requestOptions = {
31
- url: `${this.resource}/v1.0/informationProtection/threatAssessmentRequests/${args.options.id}${args.options.withResults ? '?$expand=results' : ''}`,
35
+ url: `${this.resource}/v1.0/informationProtection/threatAssessmentRequests/${args.options.id}${shouldIncludeResults ? '?$expand=results' : ''}`,
32
36
  headers: {
33
37
  accept: 'application/json;odata.metadata=none'
34
38
  },
@@ -52,6 +56,8 @@ _PurviewThreatAssessmentGetCommand_instances = new WeakSet(), _PurviewThreatAsse
52
56
  }, _PurviewThreatAssessmentGetCommand_initOptions = function _PurviewThreatAssessmentGetCommand_initOptions() {
53
57
  this.options.unshift({
54
58
  option: '-i, --id <id>'
59
+ }, {
60
+ option: '--includeResults'
55
61
  }, {
56
62
  option: '--withResults'
57
63
  });
@@ -35,6 +35,9 @@ class SpoFileMoveCommand extends SpoCommand {
35
35
  const sourceServerRelativePath = await this.getSourcePath(logger, args.options);
36
36
  const sourcePath = this.getAbsoluteUrl(args.options.webUrl, sourceServerRelativePath);
37
37
  const destinationPath = this.getAbsoluteUrl(args.options.webUrl, args.options.targetUrl);
38
+ if (args.options.includeItemPermissions) {
39
+ await this.warn(logger, `Parameter 'includeItemPermissions' is deprecated. Please use 'withItemPermissions' instead`);
40
+ }
38
41
  if (this.verbose) {
39
42
  await logger.logToStderr(`Moving file '${sourceServerRelativePath}' to '${args.options.targetUrl}'...`);
40
43
  }
@@ -46,7 +49,7 @@ class SpoFileMoveCommand extends SpoCommand {
46
49
  const copyJobResponse = await spo.createFileCopyJob(args.options.webUrl, sourcePath, destinationPath, {
47
50
  nameConflictBehavior: this.getNameConflictBehaviorValue(args.options.nameConflictBehavior),
48
51
  bypassSharedLock: !!args.options.bypassSharedLock,
49
- includeItemPermissions: !!args.options.withItemPermissions,
52
+ includeItemPermissions: !!args.options.includeItemPermissions || !!args.options.withItemPermissions,
50
53
  newName: newName,
51
54
  operation: 'move'
52
55
  });
@@ -118,6 +121,7 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
118
121
  sourceId: typeof args.options.sourceId !== 'undefined',
119
122
  newName: typeof args.options.newName !== 'undefined',
120
123
  nameConflictBehavior: typeof args.options.nameConflictBehavior !== 'undefined',
124
+ includeItemPermissions: !!args.options.includeItemPermissions,
121
125
  withItemPermissions: !!args.options.withItemPermissions,
122
126
  bypassSharedLock: !!args.options.bypassSharedLock,
123
127
  skipWait: !!args.options.skipWait
@@ -137,6 +141,8 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
137
141
  }, {
138
142
  option: '--nameConflictBehavior [nameConflictBehavior]',
139
143
  autocomplete: this.nameConflictBehaviorOptions
144
+ }, {
145
+ option: '--includeItemPermissions'
140
146
  }, {
141
147
  option: '--withItemPermissions'
142
148
  }, {
@@ -162,7 +168,7 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
162
168
  this.optionSets.push({ options: ['sourceUrl', 'sourceId'] });
163
169
  }, _SpoFileMoveCommand_initTypes = function _SpoFileMoveCommand_initTypes() {
164
170
  this.types.string.push('webUrl', 'sourceUrl', 'sourceId', 'targetUrl', 'newName', 'nameConflictBehavior');
165
- this.types.boolean.push('withItemPermissions', 'bypassSharedLock', 'skipWait');
171
+ this.types.boolean.push('includeItemPermissions', 'withItemPermissions', 'bypassSharedLock', 'skipWait');
166
172
  };
167
173
  export default new SpoFileMoveCommand();
168
174
  //# sourceMappingURL=file-move.js.map
@@ -29,12 +29,20 @@ class SpoHubSiteGetCommand extends SpoCommand {
29
29
  }
30
30
  async commandAction(logger, args) {
31
31
  try {
32
+ if (args.options.includeAssociatedSites) {
33
+ await this.warn(logger, `Parameter 'includeAssociatedSites' is deprecated. Please use 'withAssociatedSites' instead`);
34
+ }
32
35
  const spoUrl = await spo.getSpoUrl(logger, this.debug);
33
36
  const hubSite = args.options.id ? await this.getHubSiteById(spoUrl, args.options) : await this.getHubSite(spoUrl, args.options);
34
- if (args.options.withAssociatedSites && (args.options.output && args.options.output !== 'json')) {
35
- throw 'withAssociatedSites option is only allowed with json output mode';
37
+ if ((args.options.includeAssociatedSites || args.options.withAssociatedSites) && (args.options.output && args.options.output !== 'json')) {
38
+ if (args.options.includeAssociatedSites) {
39
+ throw 'includeAssociatedSites option is only allowed with json output mode';
40
+ }
41
+ else {
42
+ throw 'withAssociatedSites option is only allowed with json output mode';
43
+ }
36
44
  }
37
- if (args.options.withAssociatedSites === true && args.options.output && !cli.shouldTrimOutput(args.options.output)) {
45
+ if ((args.options.includeAssociatedSites === true || args.options.withAssociatedSites === true) && args.options.output && !cli.shouldTrimOutput(args.options.output)) {
38
46
  const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
39
47
  const associatedSitesCommandOutput = await this.getAssociatedSites(spoAdminUrl, hubSite.SiteId, logger, args);
40
48
  const associatedSites = JSON.parse(associatedSitesCommandOutput.stdout);
@@ -100,11 +108,12 @@ _SpoHubSiteGetCommand_instances = new WeakSet(), _SpoHubSiteGetCommand_initTelem
100
108
  id: typeof args.options.id !== 'undefined',
101
109
  title: typeof args.options.title !== 'undefined',
102
110
  url: typeof args.options.url !== 'undefined',
111
+ includeAssociatedSites: args.options.includeAssociatedSites === true,
103
112
  withAssociatedSites: args.options.withAssociatedSites === true
104
113
  });
105
114
  });
106
115
  }, _SpoHubSiteGetCommand_initOptions = function _SpoHubSiteGetCommand_initOptions() {
107
- this.options.unshift({ option: '-i, --id [id]' }, { option: '-t, --title [title]' }, { option: '-u, --url [url]' }, { option: '--withAssociatedSites' });
116
+ this.options.unshift({ option: '-i, --id [id]' }, { option: '-t, --title [title]' }, { option: '-u, --url [url]' }, { option: '--includeAssociatedSites' }, { option: '--withAssociatedSites' });
108
117
  }, _SpoHubSiteGetCommand_initValidators = function _SpoHubSiteGetCommand_initValidators() {
109
118
  this.validators.push(async (args) => {
110
119
  if (args.options.id && !validation.isValidGuid(args.options.id)) {
@@ -29,10 +29,14 @@ class SpoHubSiteListCommand extends SpoCommand {
29
29
  }
30
30
  async commandAction(logger, args) {
31
31
  try {
32
+ if (args.options.includeAssociatedSites) {
33
+ await this.warn(logger, `Parameter 'includeAssociatedSites' is deprecated. Please use 'withAssociatedSites' instead`);
34
+ }
32
35
  const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
33
36
  const hubSitesResult = await odata.getAllItems(`${spoAdminUrl}/_api/hubsites`);
34
37
  const hubSites = hubSitesResult;
35
- if (!(args.options.withAssociatedSites !== true || args.options.output && args.options.output !== 'json')) {
38
+ const shouldIncludeAssociatedSites = args.options.includeAssociatedSites || args.options.withAssociatedSites;
39
+ if (!(shouldIncludeAssociatedSites !== true || args.options.output && args.options.output !== 'json')) {
36
40
  if (this.debug) {
37
41
  await logger.logToStderr('Retrieving associated sites...');
38
42
  await logger.logToStderr('');
@@ -104,11 +108,14 @@ class SpoHubSiteListCommand extends SpoCommand {
104
108
  _SpoHubSiteListCommand_instances = new WeakSet(), _SpoHubSiteListCommand_initTelemetry = function _SpoHubSiteListCommand_initTelemetry() {
105
109
  this.telemetry.push((args) => {
106
110
  Object.assign(this.telemetryProperties, {
111
+ includeAssociatedSites: args.options.includeAssociatedSites === true,
107
112
  withAssociatedSites: args.options.withAssociatedSites === true
108
113
  });
109
114
  });
110
115
  }, _SpoHubSiteListCommand_initOptions = function _SpoHubSiteListCommand_initOptions() {
111
116
  this.options.unshift({
117
+ option: '-i, --includeAssociatedSites'
118
+ }, {
112
119
  option: '--withAssociatedSites'
113
120
  });
114
121
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SPOTenantSitePropertiesEnumerable.js.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TenantSiteProperties.js.map
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoSiteArchiveCommand_instances, _SpoSiteArchiveCommand_initTelemetry, _SpoSiteArchiveCommand_initOptions, _SpoSiteArchiveCommand_initValidators, _SpoSiteArchiveCommand_initTypes;
6
+ var _SpoTenantSiteArchiveCommand_instances, _SpoTenantSiteArchiveCommand_initTelemetry, _SpoTenantSiteArchiveCommand_initOptions, _SpoTenantSiteArchiveCommand_initValidators, _SpoTenantSiteArchiveCommand_initTypes;
7
7
  import { cli } from '../../../../cli/cli.js';
8
8
  import config from '../../../../config.js';
9
9
  import request from '../../../../request.js';
@@ -11,20 +11,20 @@ import { validation } from '../../../../utils/validation.js';
11
11
  import { spo } from '../../../../utils/spo.js';
12
12
  import SpoCommand from '../../../base/SpoCommand.js';
13
13
  import commands from '../../commands.js';
14
- class SpoSiteArchiveCommand extends SpoCommand {
14
+ class SpoTenantSiteArchiveCommand extends SpoCommand {
15
15
  get name() {
16
- return commands.SITE_ARCHIVE;
16
+ return commands.TENANT_SITE_ARCHIVE;
17
17
  }
18
18
  get description() {
19
19
  return 'Archives a site collection';
20
20
  }
21
21
  constructor() {
22
22
  super();
23
- _SpoSiteArchiveCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _SpoSiteArchiveCommand_instances, "m", _SpoSiteArchiveCommand_initTelemetry).call(this);
25
- __classPrivateFieldGet(this, _SpoSiteArchiveCommand_instances, "m", _SpoSiteArchiveCommand_initOptions).call(this);
26
- __classPrivateFieldGet(this, _SpoSiteArchiveCommand_instances, "m", _SpoSiteArchiveCommand_initValidators).call(this);
27
- __classPrivateFieldGet(this, _SpoSiteArchiveCommand_instances, "m", _SpoSiteArchiveCommand_initTypes).call(this);
23
+ _SpoTenantSiteArchiveCommand_instances.add(this);
24
+ __classPrivateFieldGet(this, _SpoTenantSiteArchiveCommand_instances, "m", _SpoTenantSiteArchiveCommand_initTelemetry).call(this);
25
+ __classPrivateFieldGet(this, _SpoTenantSiteArchiveCommand_instances, "m", _SpoTenantSiteArchiveCommand_initOptions).call(this);
26
+ __classPrivateFieldGet(this, _SpoTenantSiteArchiveCommand_instances, "m", _SpoTenantSiteArchiveCommand_initValidators).call(this);
27
+ __classPrivateFieldGet(this, _SpoTenantSiteArchiveCommand_instances, "m", _SpoTenantSiteArchiveCommand_initTypes).call(this);
28
28
  }
29
29
  async commandAction(logger, args) {
30
30
  const archiveSite = async () => {
@@ -81,19 +81,19 @@ class SpoSiteArchiveCommand extends SpoCommand {
81
81
  }
82
82
  }
83
83
  }
84
- _SpoSiteArchiveCommand_instances = new WeakSet(), _SpoSiteArchiveCommand_initTelemetry = function _SpoSiteArchiveCommand_initTelemetry() {
84
+ _SpoTenantSiteArchiveCommand_instances = new WeakSet(), _SpoTenantSiteArchiveCommand_initTelemetry = function _SpoTenantSiteArchiveCommand_initTelemetry() {
85
85
  this.telemetry.push((args) => {
86
86
  Object.assign(this.telemetryProperties, {
87
87
  force: !!args.options.force
88
88
  });
89
89
  });
90
- }, _SpoSiteArchiveCommand_initOptions = function _SpoSiteArchiveCommand_initOptions() {
90
+ }, _SpoTenantSiteArchiveCommand_initOptions = function _SpoTenantSiteArchiveCommand_initOptions() {
91
91
  this.options.unshift({ option: '-u, --url <url>' }, { option: '-f, --force' });
92
- }, _SpoSiteArchiveCommand_initValidators = function _SpoSiteArchiveCommand_initValidators() {
92
+ }, _SpoTenantSiteArchiveCommand_initValidators = function _SpoTenantSiteArchiveCommand_initValidators() {
93
93
  this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.url));
94
- }, _SpoSiteArchiveCommand_initTypes = function _SpoSiteArchiveCommand_initTypes() {
94
+ }, _SpoTenantSiteArchiveCommand_initTypes = function _SpoTenantSiteArchiveCommand_initTypes() {
95
95
  this.types.string.push('url');
96
96
  this.types.boolean.push('force');
97
97
  };
98
- export default new SpoSiteArchiveCommand();
99
- //# sourceMappingURL=site-archive.js.map
98
+ export default new SpoTenantSiteArchiveCommand();
99
+ //# sourceMappingURL=tenant-site-archive.js.map
@@ -3,16 +3,16 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoSiteListCommand_instances, _SpoSiteListCommand_initTelemetry, _SpoSiteListCommand_initOptions, _SpoSiteListCommand_initValidators;
6
+ var _SpoTenantSiteListCommand_instances, _SpoTenantSiteListCommand_initTelemetry, _SpoTenantSiteListCommand_initOptions, _SpoTenantSiteListCommand_initValidators;
7
7
  import config from '../../../../config.js';
8
8
  import request from '../../../../request.js';
9
9
  import { formatting } from '../../../../utils/formatting.js';
10
10
  import { spo } from '../../../../utils/spo.js';
11
11
  import SpoCommand from '../../../base/SpoCommand.js';
12
12
  import commands from '../../commands.js';
13
- class SpoSiteListCommand extends SpoCommand {
13
+ class SpoTenantSiteListCommand extends SpoCommand {
14
14
  get name() {
15
- return commands.SITE_LIST;
15
+ return commands.TENANT_SITE_LIST;
16
16
  }
17
17
  get description() {
18
18
  return 'Lists sites of the given type';
@@ -22,17 +22,20 @@ class SpoSiteListCommand extends SpoCommand {
22
22
  }
23
23
  constructor() {
24
24
  super();
25
- _SpoSiteListCommand_instances.add(this);
26
- __classPrivateFieldGet(this, _SpoSiteListCommand_instances, "m", _SpoSiteListCommand_initTelemetry).call(this);
27
- __classPrivateFieldGet(this, _SpoSiteListCommand_instances, "m", _SpoSiteListCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _SpoSiteListCommand_instances, "m", _SpoSiteListCommand_initValidators).call(this);
25
+ _SpoTenantSiteListCommand_instances.add(this);
26
+ __classPrivateFieldGet(this, _SpoTenantSiteListCommand_instances, "m", _SpoTenantSiteListCommand_initTelemetry).call(this);
27
+ __classPrivateFieldGet(this, _SpoTenantSiteListCommand_instances, "m", _SpoTenantSiteListCommand_initOptions).call(this);
28
+ __classPrivateFieldGet(this, _SpoTenantSiteListCommand_instances, "m", _SpoTenantSiteListCommand_initValidators).call(this);
29
29
  }
30
30
  alias() {
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.withOneDriveSites || 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 SpoSiteListCommand extends SpoCommand {
76
79
  if (options.webTemplate) {
77
80
  return options.webTemplate;
78
81
  }
79
- if (options.withOneDriveSites) {
82
+ if (options.includeOneDriveSites || options.withOneDriveSites) {
80
83
  return '';
81
84
  }
82
85
  switch (options.type) {
@@ -89,16 +92,17 @@ class SpoSiteListCommand extends SpoCommand {
89
92
  }
90
93
  }
91
94
  }
92
- _SpoSiteListCommand_instances = new WeakSet(), _SpoSiteListCommand_initTelemetry = function _SpoSiteListCommand_initTelemetry() {
95
+ _SpoTenantSiteListCommand_instances = new WeakSet(), _SpoTenantSiteListCommand_initTelemetry = function _SpoTenantSiteListCommand_initTelemetry() {
93
96
  this.telemetry.push((args) => {
94
97
  Object.assign(this.telemetryProperties, {
95
98
  webTemplate: args.options.webTemplate,
96
99
  type: args.options.type,
97
100
  filter: (!(!args.options.filter)).toString(),
101
+ includeOneDriveSites: typeof args.options.includeOneDriveSites !== 'undefined',
98
102
  withOneDriveSites: typeof args.options.withOneDriveSites !== 'undefined'
99
103
  });
100
104
  });
101
- }, _SpoSiteListCommand_initOptions = function _SpoSiteListCommand_initOptions() {
105
+ }, _SpoTenantSiteListCommand_initOptions = function _SpoTenantSiteListCommand_initOptions() {
102
106
  this.options.unshift({
103
107
  option: '-t, --type [type]',
104
108
  autocomplete: ['TeamSite', 'CommunicationSite']
@@ -106,10 +110,12 @@ _SpoSiteListCommand_instances = new WeakSet(), _SpoSiteListCommand_initTelemetry
106
110
  option: '--webTemplate [webTemplate]'
107
111
  }, {
108
112
  option: '--filter [filter]'
113
+ }, {
114
+ option: '--includeOneDriveSites'
109
115
  }, {
110
116
  option: '--withOneDriveSites'
111
117
  });
112
- }, _SpoSiteListCommand_initValidators = function _SpoSiteListCommand_initValidators() {
118
+ }, _SpoTenantSiteListCommand_initValidators = function _SpoTenantSiteListCommand_initValidators() {
113
119
  this.validators.push(async (args) => {
114
120
  if (args.options.type && args.options.webTemplate) {
115
121
  return 'Specify either type or webTemplate, but not both';
@@ -119,12 +125,17 @@ _SpoSiteListCommand_instances = new WeakSet(), _SpoSiteListCommand_initTelemetry
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.withOneDriveSites
128
+ if (args.options.includeOneDriveSites || args.options.withOneDriveSites
123
129
  && (args.options.type || args.options.webTemplate)) {
124
- return 'When using withOneDriveSites, don\'t specify the type or webTemplate options';
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
  });
128
139
  };
129
- export default new SpoSiteListCommand();
130
- //# sourceMappingURL=site-list.js.map
140
+ export default new SpoTenantSiteListCommand();
141
+ //# sourceMappingURL=tenant-site-list.js.map