@pnp/cli-microsoft365 10.8.0-beta.cdb5c81 → 10.9.0-beta.3261443

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 (67) hide show
  1. package/.devcontainer/Dockerfile +1 -1
  2. package/Dockerfile +3 -3
  3. package/README.md +4 -2
  4. package/allCommands.json +1 -1
  5. package/allCommandsFull.json +1 -1
  6. package/dist/m365/app/commands/app-get.js +5 -2
  7. package/dist/m365/app/commands/app-open.js +9 -22
  8. package/dist/m365/app/commands/permission/permission-add.js +18 -30
  9. package/dist/m365/app/commands/permission/permission-list.js +5 -2
  10. package/dist/m365/base/AppCommand.js +9 -25
  11. package/dist/m365/booking/commands/business/business-get.js +18 -25
  12. package/dist/m365/context/commands/context-remove.js +12 -25
  13. package/dist/m365/context/commands/option/option-remove.js +11 -25
  14. package/dist/m365/entra/commands/m365group/m365group-get.js +16 -3
  15. package/dist/m365/entra/commands/m365group/m365group-list.js +7 -1
  16. package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +9 -3
  17. package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +9 -3
  18. package/dist/m365/entra/commands/pim/pim-role-request-list.js +9 -3
  19. package/dist/m365/flow/commands/flow-list.js +14 -7
  20. package/dist/m365/flow/commands/run/run-get.js +1 -1
  21. package/dist/m365/graph/commands/directoryextension/directoryextension-list.js +74 -0
  22. package/dist/m365/graph/commands/subscription/subscription-add.js +10 -3
  23. package/dist/m365/graph/commands.js +1 -0
  24. package/dist/m365/pp/commands/solution/solution-publisher-list.js +8 -1
  25. package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +9 -2
  26. package/dist/m365/spo/commands/file/file-move.js +8 -2
  27. package/dist/m365/spo/commands/hubsite/hubsite-get.js +14 -5
  28. package/dist/m365/spo/commands/hubsite/hubsite-list.js +9 -2
  29. package/dist/m365/spo/commands/list/list-get.js +12 -6
  30. package/dist/m365/spo/commands/page/clientsidepages.js +49 -17
  31. package/dist/m365/spo/commands/tenant/tenant-site-list.js +16 -5
  32. package/dist/m365/spo/commands/term/term-list.js +10 -3
  33. package/dist/m365/spp/commands/model/model-apply.js +130 -0
  34. package/dist/m365/spp/commands/model/model-get.js +7 -24
  35. package/dist/m365/spp/commands/model/model-list.js +1 -1
  36. package/dist/m365/spp/commands/model/model-remove.js +1 -1
  37. package/dist/m365/spp/commands.js +1 -0
  38. package/dist/m365/teams/commands/chat/chat-member-add.js +10 -4
  39. package/dist/m365/viva/commands/engage/engage-community-remove.js +99 -0
  40. package/dist/m365/viva/commands/engage/engage-network-list.js +8 -2
  41. package/dist/m365/viva/commands.js +1 -0
  42. package/dist/utils/spp.js +59 -1
  43. package/docs/docs/cmd/entra/m365group/m365group-get.mdx +8 -5
  44. package/docs/docs/cmd/entra/m365group/m365group-list.mdx +14 -12
  45. package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +7 -4
  46. package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +9 -6
  47. package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +7 -4
  48. package/docs/docs/cmd/flow/flow-list.mdx +8 -5
  49. package/docs/docs/cmd/flow/run/run-get.mdx +1 -1
  50. package/docs/docs/cmd/graph/directoryextension/directoryextension-list.mdx +135 -0
  51. package/docs/docs/cmd/graph/subscription/subscription-add.mdx +6 -3
  52. package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +7 -4
  53. package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +7 -4
  54. package/docs/docs/cmd/spo/file/file-move.mdx +4 -1
  55. package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +6 -3
  56. package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +7 -4
  57. package/docs/docs/cmd/spo/list/list-add.mdx +1 -1
  58. package/docs/docs/cmd/spo/list/list-get.mdx +12 -3
  59. package/docs/docs/cmd/spo/list/list-set.mdx +2 -2
  60. package/docs/docs/cmd/spo/tenant/tenant-site-list.mdx +10 -7
  61. package/docs/docs/cmd/spo/term/term-list.mdx +7 -4
  62. package/docs/docs/cmd/spp/model/model-apply.mdx +79 -0
  63. package/docs/docs/cmd/teams/chat/chat-member-add.mdx +6 -3
  64. package/docs/docs/cmd/viva/engage/engage-community-remove.mdx +61 -0
  65. package/docs/docs/cmd/viva/engage/engage-network-list.mdx +7 -4
  66. package/npm-shrinkwrap.json +112 -97
  67. package/package.json +14 -14
@@ -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, includeSolutions } = 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, includeSolutions, '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, includeSolutions, '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, includeSolutions, 'personal');
50
+ let url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions, 'personal');
47
51
  items = await odata.getAllItems(url);
48
- url = this.getApiUrl(environmentName, asAdmin, includeSolutions, '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, includeSolutions);
57
+ const url = this.getApiUrl(environmentName, asAdmin, shouldIncludeSolutions);
54
58
  items = await odata.getAllItems(url);
55
59
  }
56
60
  // Remove duplicates
@@ -81,6 +85,7 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
81
85
  Object.assign(this.telemetryProperties, {
82
86
  sharingStatus: typeof args.options.sharingStatus !== 'undefined',
83
87
  includeSolutions: !!args.options.includeSolutions,
88
+ withSolutions: !!args.options.withSolutions,
84
89
  asAdmin: !!args.options.asAdmin
85
90
  });
86
91
  });
@@ -92,6 +97,8 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
92
97
  autocomplete: this.allowedSharingStatuses
93
98
  }, {
94
99
  option: '--includeSolutions'
100
+ }, {
101
+ option: '--withSolutions'
95
102
  }, {
96
103
  option: '--asAdmin'
97
104
  });
@@ -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('includeSolutions', 'asAdmin');
117
+ this.types.boolean.push('includeSolutions', 'withSolutions', 'asAdmin');
111
118
  };
112
119
  export default new FlowListCommand();
113
120
  //# sourceMappingURL=flow-list.js.map
@@ -28,7 +28,7 @@ class FlowRunGetCommand extends PowerAutomateCommand {
28
28
  await logger.logToStderr(`Retrieving information about run ${args.options.name} of Microsoft Flow ${args.options.flowName}...`);
29
29
  }
30
30
  if (args.options.includeTriggerInformation) {
31
- await this.warn(logger, `Parameter 'includeTriggerInformation' is deprecated. Please use 'withTrigger instead`);
31
+ await this.warn(logger, `Parameter 'includeTriggerInformation' is deprecated. Please use 'withTrigger' instead`);
32
32
  }
33
33
  const actionsParameter = args.options.withActions ? '$expand=properties%2Factions&' : '';
34
34
  const requestOptions = {
@@ -0,0 +1,74 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
3
+ import request from '../../../../request.js';
4
+ import commands from '../../commands.js';
5
+ import GraphCommand from '../../../base/GraphCommand.js';
6
+ import { validation } from '../../../../utils/validation.js';
7
+ import { entraApp } from '../../../../utils/entraApp.js';
8
+ import { odata } from '../../../../utils/odata.js';
9
+ const options = globalOptionsZod
10
+ .extend({
11
+ appId: z.string().refine(id => validation.isValidGuid(id), id => ({
12
+ message: `'${id}' is not a valid GUID.`
13
+ })).optional(),
14
+ appObjectId: z.string().refine(id => validation.isValidGuid(id), id => ({
15
+ message: `'${id}' is not a valid GUID.`
16
+ })).optional(),
17
+ appName: z.string().optional()
18
+ })
19
+ .strict();
20
+ class GraphDirectoryExtensionListCommand extends GraphCommand {
21
+ get name() {
22
+ return commands.DIRECTORYEXTENSION_LIST;
23
+ }
24
+ get description() {
25
+ return 'Retrieves a list of directory extensions';
26
+ }
27
+ defaultProperties() {
28
+ return ['id', 'name', 'appDisplayName'];
29
+ }
30
+ get schema() {
31
+ return options;
32
+ }
33
+ getRefinedSchema(schema) {
34
+ return schema
35
+ .refine(options => ([options.appId, options.appObjectId, options.appName].filter(x => x !== undefined).length <= 1), {
36
+ message: 'Specify either appId, appObjectId, or appName, but not multiple.'
37
+ });
38
+ }
39
+ async commandAction(logger, args) {
40
+ try {
41
+ if (args.options.appId || args.options.appObjectId || args.options.appName) {
42
+ const appObjectId = await this.getAppObjectId(args.options);
43
+ const endpoint = `${this.resource}/v1.0/applications/${appObjectId}/extensionProperties/`;
44
+ const items = await odata.getAllItems(endpoint);
45
+ await logger.log(items);
46
+ }
47
+ else {
48
+ const requestOptions = {
49
+ url: `${this.resource}/v1.0/directoryObjects/getAvailableExtensionProperties`,
50
+ headers: {
51
+ 'content-type': 'application/json;odata.metadata=none'
52
+ },
53
+ responseType: 'json'
54
+ };
55
+ const res = await request.post(requestOptions);
56
+ await logger.log(res.value);
57
+ }
58
+ }
59
+ catch (err) {
60
+ this.handleRejectedODataJsonPromise(err);
61
+ }
62
+ }
63
+ async getAppObjectId(options) {
64
+ if (options.appObjectId) {
65
+ return options.appObjectId;
66
+ }
67
+ if (options.appId) {
68
+ return (await entraApp.getAppRegistrationByAppId(options.appId, ["id"])).id;
69
+ }
70
+ return (await entraApp.getAppRegistrationByAppName(options.appName, ["id"])).id;
71
+ }
72
+ }
73
+ export default new GraphDirectoryExtensionListCommand();
74
+ //# sourceMappingURL=directoryextension-list.js.map
@@ -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.includeResourceData,
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
  }
@@ -133,6 +136,7 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
133
136
  notificationUrlAppId: typeof args.options.notificationUrlAppId !== 'undefined',
134
137
  latestTLSVersion: typeof args.options.latestTLSVersion !== 'undefined',
135
138
  includeResourceData: !!args.options.includeResourceData,
139
+ withResourceData: !!args.options.withResourceData,
136
140
  encryptionCertificate: typeof args.options.encryptionCertificate !== 'undefined',
137
141
  encryptionCertificateId: typeof args.options.encryptionCertificateId !== 'undefined'
138
142
  });
@@ -158,6 +162,8 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
158
162
  autocomplete: this.allowedTlsVersions
159
163
  }, {
160
164
  option: '--includeResourceData [includeResourceData]'
165
+ }, {
166
+ option: '--withResourceData [withResourceData]'
161
167
  }, {
162
168
  option: '--encryptionCertificate [encryptionCertificate]'
163
169
  }, {
@@ -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.includeResourceData && !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.includeResourceData && !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)) {
@@ -3,6 +3,7 @@ export default {
3
3
  CHANGELOG_LIST: `${prefix} changelog list`,
4
4
  DIRECTORYEXTENSION_ADD: `${prefix} directoryextension add`,
5
5
  DIRECTORYEXTENSION_GET: `${prefix} directoryextension get`,
6
+ DIRECTORYEXTENSION_LIST: `${prefix} directoryextension list`,
6
7
  DIRECTORYEXTENSION_REMOVE: `${prefix} directoryextension remove`,
7
8
  OPENEXTENSION_ADD: `${prefix} openextension add`,
8
9
  OPENEXTENSION_GET: `${prefix} openextension get`,
@@ -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.includeMicrosoftPublishers ? `&$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
  },
@@ -49,6 +53,7 @@ _PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherL
49
53
  this.telemetry.push((args) => {
50
54
  Object.assign(this.telemetryProperties, {
51
55
  includeMicrosoftPublishers: typeof args.options.includeMicrosoftPublishers !== 'undefined',
56
+ withMicrosoftPublishers: typeof args.options.withMicrosoftPublishers !== 'undefined',
52
57
  asAdmin: !!args.options.asAdmin
53
58
  });
54
59
  });
@@ -57,6 +62,8 @@ _PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherL
57
62
  option: '-e, --environmentName <environmentName>'
58
63
  }, {
59
64
  option: '--includeMicrosoftPublishers'
65
+ }, {
66
+ option: '--withMicrosoftPublishers'
60
67
  }, {
61
68
  option: '--asAdmin'
62
69
  });
@@ -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.includeResults ? '?$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
  },
@@ -45,7 +49,8 @@ class PurviewThreatAssessmentGetCommand extends GraphCommand {
45
49
  _PurviewThreatAssessmentGetCommand_instances = new WeakSet(), _PurviewThreatAssessmentGetCommand_initTelemetry = function _PurviewThreatAssessmentGetCommand_initTelemetry() {
46
50
  this.telemetry.push((args) => {
47
51
  Object.assign(this.telemetryProperties, {
48
- includeResults: !!args.options.includeResults
52
+ includeResults: !!args.options.includeResults,
53
+ withResults: !!args.options.withResults
49
54
  });
50
55
  });
51
56
  }, _PurviewThreatAssessmentGetCommand_initOptions = function _PurviewThreatAssessmentGetCommand_initOptions() {
@@ -53,6 +58,8 @@ _PurviewThreatAssessmentGetCommand_instances = new WeakSet(), _PurviewThreatAsse
53
58
  option: '-i, --id <id>'
54
59
  }, {
55
60
  option: '--includeResults'
61
+ }, {
62
+ option: '--withResults'
56
63
  });
57
64
  }, _PurviewThreatAssessmentGetCommand_initValidators = function _PurviewThreatAssessmentGetCommand_initValidators() {
58
65
  this.validators.push(async (args) => {
@@ -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.includeItemPermissions,
52
+ includeItemPermissions: !!args.options.includeItemPermissions || !!args.options.withItemPermissions,
50
53
  newName: newName,
51
54
  operation: 'move'
52
55
  });
@@ -119,6 +122,7 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
119
122
  newName: typeof args.options.newName !== 'undefined',
120
123
  nameConflictBehavior: typeof args.options.nameConflictBehavior !== 'undefined',
121
124
  includeItemPermissions: !!args.options.includeItemPermissions,
125
+ withItemPermissions: !!args.options.withItemPermissions,
122
126
  bypassSharedLock: !!args.options.bypassSharedLock,
123
127
  skipWait: !!args.options.skipWait
124
128
  });
@@ -139,6 +143,8 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
139
143
  autocomplete: this.nameConflictBehaviorOptions
140
144
  }, {
141
145
  option: '--includeItemPermissions'
146
+ }, {
147
+ option: '--withItemPermissions'
142
148
  }, {
143
149
  option: '--bypassSharedLock'
144
150
  }, {
@@ -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('includeItemPermissions', '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.includeAssociatedSites && (args.options.output && args.options.output !== 'json')) {
35
- throw 'includeAssociatedSites 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.includeAssociatedSites === 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',
103
- includeAssociatedSites: args.options.includeAssociatedSites === true
111
+ includeAssociatedSites: args.options.includeAssociatedSites === true,
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: '--includeAssociatedSites' });
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.includeAssociatedSites !== 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,12 +108,15 @@ 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, {
107
- includeAssociatedSites: args.options.includeAssociatedSites === true
111
+ includeAssociatedSites: args.options.includeAssociatedSites === true,
112
+ withAssociatedSites: args.options.withAssociatedSites === true
108
113
  });
109
114
  });
110
115
  }, _SpoHubSiteListCommand_initOptions = function _SpoHubSiteListCommand_initOptions() {
111
116
  this.options.unshift({
112
117
  option: '-i, --includeAssociatedSites'
118
+ }, {
119
+ option: '--withAssociatedSites'
113
120
  });
114
121
  };
115
122
  export default new SpoHubSiteListCommand();
@@ -43,6 +43,9 @@ class SpoListGetCommand extends SpoCommand {
43
43
  const listServerRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
44
44
  requestUrl += `GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
45
45
  }
46
+ else if (args.options.default) {
47
+ requestUrl += `DefaultDocumentLibrary`;
48
+ }
46
49
  const fieldsProperties = this.formatSelectProperties(args.options.properties, args.options.withPermissions);
47
50
  const queryParams = [];
48
51
  if (fieldsProperties.selectProperties.length > 0) {
@@ -113,11 +116,12 @@ class SpoListGetCommand extends SpoCommand {
113
116
  _SpoListGetCommand_instances = new WeakSet(), _SpoListGetCommand_initTelemetry = function _SpoListGetCommand_initTelemetry() {
114
117
  this.telemetry.push((args) => {
115
118
  Object.assign(this.telemetryProperties, {
116
- id: (!(!args.options.id)).toString(),
117
- title: (!(!args.options.title)).toString(),
118
- url: (!(!args.options.url)).toString(),
119
- properties: (!(!args.options.properties)).toString(),
120
- withPermissions: typeof args.options.withPermissions !== 'undefined'
119
+ id: typeof args.options.id !== 'undefined',
120
+ title: typeof args.options.title !== 'undefined',
121
+ url: typeof args.options.url !== 'undefined',
122
+ properties: typeof args.options.properties !== 'undefined',
123
+ withPermissions: !!args.options.withPermissions,
124
+ default: !!args.options.default
121
125
  });
122
126
  });
123
127
  }, _SpoListGetCommand_initOptions = function _SpoListGetCommand_initOptions() {
@@ -129,6 +133,8 @@ _SpoListGetCommand_instances = new WeakSet(), _SpoListGetCommand_initTelemetry =
129
133
  option: '-t, --title [title]'
130
134
  }, {
131
135
  option: '--url [url]'
136
+ }, {
137
+ option: '--default'
132
138
  }, {
133
139
  option: '-p, --properties [properties]'
134
140
  }, {
@@ -148,7 +154,7 @@ _SpoListGetCommand_instances = new WeakSet(), _SpoListGetCommand_initTelemetry =
148
154
  return true;
149
155
  });
150
156
  }, _SpoListGetCommand_initOptionSets = function _SpoListGetCommand_initOptionSets() {
151
- this.optionSets.push({ options: ['id', 'title', 'url'] });
157
+ this.optionSets.push({ options: ['id', 'title', 'url', 'default'] });
152
158
  };
153
159
  export default new SpoListGetCommand();
154
160
  //# sourceMappingURL=list-get.js.map
@@ -309,6 +309,12 @@ export class ClientSidePage {
309
309
  control.fromHtml(markup);
310
310
  page.pageSettings = control;
311
311
  break;
312
+ case 1:
313
+ // empty canvas column
314
+ control = new CanvasColumn(null, 0);
315
+ control.fromHtml(markup);
316
+ page.mergeColumnToTree(control);
317
+ break;
312
318
  case 3:
313
319
  // client side webpart
314
320
  control = new ClientSideWebpart("");
@@ -380,9 +386,9 @@ export class ClientSidePage {
380
386
  }
381
387
  }
382
388
  }
383
- const sections = this.sections.filter(s => s.order === zoneIndex);
389
+ const sections = this.sections.filter(s => s.order === zoneIndex && s.layoutIndex === (control.controlData?.position.layoutIndex ?? 1));
384
390
  if (sections.length < 1) {
385
- section = new CanvasSection(this, zoneIndex, [], control?.controlData?.position.zoneId, control.controlData?.zoneGroupMetadata);
391
+ section = new CanvasSection(this, zoneIndex, [], control?.controlData);
386
392
  this.sections.push(section);
387
393
  }
388
394
  else {
@@ -406,11 +412,11 @@ export class ClientSidePage {
406
412
  * @param position The position data for the column
407
413
  */
408
414
  mergeColumnToTree(column) {
409
- const order = column.controlData && hOP(column.controlData, "position") && hOP(column.controlData.position, "zoneIndex") ? column.controlData.position.zoneIndex : 0;
415
+ const order = column?.controlData?.position.zoneIndex || 0;
410
416
  let section = null;
411
- const sections = this.sections.filter(s => s.order === order);
417
+ const sections = this.sections.filter(s => s.order === order && s.layoutIndex === (column?.controlData?.position.layoutIndex ?? 1));
412
418
  if (sections.length < 1) {
413
- section = new CanvasSection(this, order, [], column.controlData?.position?.zoneId, column.controlData?.zoneGroupMetadata);
419
+ section = new CanvasSection(this, order, [], column.controlData);
414
420
  this.sections.push(section);
415
421
  }
416
422
  else {
@@ -421,12 +427,16 @@ export class ClientSidePage {
421
427
  }
422
428
  }
423
429
  export class CanvasSection {
424
- constructor(page, order, columns = [], zoneId, zoneGroupMetadata) {
430
+ constructor(page, order, columns = [], controlData) {
425
431
  this.page = page;
426
432
  this.order = order;
427
433
  this.columns = columns;
428
- this.zoneId = zoneId;
429
- this.zoneGroupMetadata = zoneGroupMetadata;
434
+ this.controlData = controlData;
435
+ this.zoneId = this.controlData?.position.zoneId || getGUID();
436
+ this.zoneGroupMetadata = this.controlData?.zoneGroupMetadata;
437
+ this.emphasis = this.controlData?.emphasis;
438
+ this.layoutIndex = this.controlData?.position.layoutIndex ?? 1;
439
+ this.isLayoutReflowOnTop = this.controlData?.position.isLayoutReflowOnTop;
430
440
  }
431
441
  /**
432
442
  * Default column (this.columns[0]) for this section
@@ -454,7 +464,7 @@ export class CanvasSection {
454
464
  }
455
465
  }
456
466
  class CanvasControl {
457
- constructor(controlType, dataVersion, column = undefined, order = 1, id = getGUID(), controlData = null, dynamicDataPaths = null, dynamicDataValues = null) {
467
+ constructor(controlType, dataVersion, column, order = 1, id = getGUID(), controlData, dynamicDataPaths = null, dynamicDataValues = null) {
458
468
  this.controlType = controlType;
459
469
  this.dataVersion = dataVersion;
460
470
  this.column = column;
@@ -542,16 +552,26 @@ export class CanvasColumn extends CanvasControl {
542
552
  }
543
553
  }
544
554
  getControlData() {
545
- return {
546
- displayMode: 2,
555
+ const controlData = {
547
556
  position: {
548
557
  sectionFactor: this.factor,
549
558
  sectionIndex: this.order,
550
- zoneIndex: this.section ? this.section.order : 0,
551
- zoneId: this.section?.zoneId
559
+ zoneIndex: this.section?.order || 0,
560
+ zoneId: this.section?.zoneId,
561
+ layoutIndex: this.section?.layoutIndex,
552
562
  },
553
563
  zoneGroupMetadata: this.section?.zoneGroupMetadata,
564
+ emphasis: this.section?.emphasis
554
565
  };
566
+ if (this.column?.section?.isLayoutReflowOnTop !== undefined) {
567
+ controlData.position.isLayoutReflowOnTop = this.column.section.isLayoutReflowOnTop;
568
+ }
569
+ const isEmptyColumn = this.controls.length === 0;
570
+ if (isEmptyColumn) {
571
+ controlData.id = "emptySection";
572
+ controlData.controlType = 1;
573
+ }
574
+ return controlData;
555
575
  }
556
576
  /**
557
577
  * Removes this column and all contained controls from the collection
@@ -650,7 +670,7 @@ export class ClientSideText extends ClientSidePart {
650
670
  this._text = text;
651
671
  }
652
672
  getControlData() {
653
- return {
673
+ const controlData = {
654
674
  controlType: this.controlType,
655
675
  editorType: "CKEditor",
656
676
  id: this.id,
@@ -659,10 +679,16 @@ export class ClientSideText extends ClientSidePart {
659
679
  sectionFactor: this.column ? this.column.factor : 0,
660
680
  sectionIndex: this.column ? this.column.order : 0,
661
681
  zoneIndex: this.column && this.column.section ? this.column.section.order : 0,
662
- zoneId: this.column?.section?.zoneId
682
+ zoneId: this.column?.section?.zoneId,
683
+ layoutIndex: this.column?.section?.layoutIndex
663
684
  },
664
685
  zoneGroupMetadata: this.column?.section?.zoneGroupMetadata,
686
+ emphasis: this.column?.section?.emphasis,
665
687
  };
688
+ if (this.column?.section?.isLayoutReflowOnTop !== undefined) {
689
+ controlData.position.isLayoutReflowOnTop = this.column.section.isLayoutReflowOnTop;
690
+ }
691
+ return controlData;
666
692
  }
667
693
  toHtml(index) {
668
694
  // set our order to the value passed in
@@ -767,7 +793,7 @@ export class ClientSideWebpart extends ClientSidePart {
767
793
  this.htmlProperties = htmlProps.length > 0 ? htmlProps[0] : "";
768
794
  }
769
795
  getControlData() {
770
- return {
796
+ const controlData = {
771
797
  controlType: this.controlType,
772
798
  id: this.id,
773
799
  position: {
@@ -775,11 +801,17 @@ export class ClientSideWebpart extends ClientSidePart {
775
801
  sectionFactor: this.column ? this.column.factor : 0,
776
802
  sectionIndex: this.column ? this.column.order : 0,
777
803
  zoneIndex: this.column && this.column.section ? this.column.section.order : 0,
778
- zoneId: this.column?.section?.zoneId
804
+ zoneId: this.column?.section?.zoneId,
805
+ layoutIndex: this.column?.section?.layoutIndex,
779
806
  },
780
807
  webPartId: this.webPartId,
781
808
  zoneGroupMetadata: this.column?.section?.zoneGroupMetadata,
809
+ emphasis: this.column?.section?.emphasis,
782
810
  };
811
+ if (this.column?.section?.isLayoutReflowOnTop !== undefined) {
812
+ controlData.position.isLayoutReflowOnTop = this.column.section.isLayoutReflowOnTop;
813
+ }
814
+ return controlData;
783
815
  }
784
816
  renderHtmlProperties() {
785
817
  const html = [];