@pnp/cli-microsoft365 9.1.0-beta.acd25f7 → 10.0.0-beta.04ac437

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 (80) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/cli/cli.js +1 -1
  4. package/dist/m365/app/commands/permission/permission-add.js +9 -9
  5. package/dist/m365/cli/commands/cli-consent.js +3 -7
  6. package/dist/m365/cli/commands/config/config-set.js +0 -1
  7. package/dist/m365/commands/setupPresets.js +2 -4
  8. package/dist/m365/commands/status.js +2 -2
  9. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +13 -13
  10. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +18 -18
  11. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -1
  12. package/dist/m365/entra/commands/group/group-user-list.js +4 -4
  13. package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +4 -4
  14. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +3 -3
  15. package/dist/m365/entra/commands/m365group/m365group-user-list.js +6 -9
  16. package/dist/m365/outlook/commands/message/message-get.js +11 -11
  17. package/dist/m365/spfx/commands/project/DeployWorkflow.js +1 -1
  18. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +1 -10
  19. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +0 -1
  20. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +8 -8
  21. package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +2 -2
  22. package/dist/m365/spo/commands/file/file-copy.js +59 -34
  23. package/dist/m365/spo/commands/file/file-move.js +55 -33
  24. package/dist/m365/spo/commands/folder/folder-set.js +0 -4
  25. package/dist/m365/spo/commands/list/list-list.js +1 -4
  26. package/dist/m365/spo/commands/site/site-appcatalog-remove.js +48 -24
  27. package/dist/m365/spo/commands/site/site-remove.js +1 -7
  28. package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
  29. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +2 -22
  30. package/dist/m365/spo/commands.js +0 -1
  31. package/dist/m365/viva/commands/engage/engage-group-list.js +0 -5
  32. package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -5
  33. package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -5
  34. package/dist/m365/viva/commands/engage/engage-message-add.js +0 -5
  35. package/dist/m365/viva/commands/engage/engage-message-get.js +0 -5
  36. package/dist/m365/viva/commands/engage/engage-message-like-set.js +0 -5
  37. package/dist/m365/viva/commands/engage/engage-message-list.js +0 -5
  38. package/dist/m365/viva/commands/engage/engage-message-remove.js +0 -5
  39. package/dist/m365/viva/commands/engage/engage-network-list.js +0 -5
  40. package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +0 -8
  41. package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +0 -8
  42. package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +0 -8
  43. package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +0 -8
  44. package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +0 -8
  45. package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +0 -8
  46. package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +0 -8
  47. package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +0 -8
  48. package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +0 -8
  49. package/dist/m365/viva/commands/engage/engage-search.js +0 -5
  50. package/dist/m365/viva/commands/engage/engage-user-get.js +0 -5
  51. package/dist/m365/viva/commands/engage/engage-user-list.js +0 -5
  52. package/dist/settingsNames.js +0 -1
  53. package/dist/utils/spo.js +76 -0
  54. package/docs/docs/_clisettings.mdx +0 -1
  55. package/docs/docs/cmd/app/permission/permission-add.mdx +5 -5
  56. package/docs/docs/cmd/cli/cli-consent.mdx +1 -1
  57. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +12 -12
  58. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +14 -14
  59. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +5 -5
  60. package/docs/docs/cmd/entra/group/group-user-list.mdx +7 -7
  61. package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +5 -5
  62. package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +3 -3
  63. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +1 -1
  64. package/docs/docs/cmd/outlook/message/message-get.mdx +5 -5
  65. package/docs/docs/cmd/setup.mdx +1 -3
  66. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +11 -12
  67. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +6 -5
  68. package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.mdx +7 -7
  69. package/docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx +2 -2
  70. package/docs/docs/cmd/spo/file/file-copy.mdx +119 -12
  71. package/docs/docs/cmd/spo/file/file-move.mdx +116 -9
  72. package/docs/docs/cmd/spo/folder/folder-set.mdx +0 -6
  73. package/docs/docs/cmd/spo/list/list-list.mdx +5 -7
  74. package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +11 -2
  75. package/docs/docs/cmd/spo/site/site-remove.mdx +0 -3
  76. package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
  77. package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.mdx +2 -49
  78. package/npm-shrinkwrap.json +2 -2
  79. package/package.json +1 -1
  80. package/dist/m365/viva/commands/engage/yammerCommands.js +0 -25
@@ -8,7 +8,6 @@ import { cli } from '../../../../cli/cli.js';
8
8
  import request from '../../../../request.js';
9
9
  import VivaEngageCommand from "../../../base/VivaEngageCommand.js";
10
10
  import commands from '../../commands.js';
11
- import yammerCommands from './yammerCommands.js';
12
11
  class VivaEngageGroupUserRemoveCommand extends VivaEngageCommand {
13
12
  get name() {
14
13
  return commands.ENGAGE_GROUP_USER_REMOVE;
@@ -16,9 +15,6 @@ class VivaEngageGroupUserRemoveCommand extends VivaEngageCommand {
16
15
  get description() {
17
16
  return 'Removes a user from a Viva Engage group';
18
17
  }
19
- alias() {
20
- return [yammerCommands.GROUP_USER_REMOVE];
21
- }
22
18
  constructor() {
23
19
  super();
24
20
  _VivaEngageGroupUserRemoveCommand_instances.add(this);
@@ -27,7 +23,6 @@ class VivaEngageGroupUserRemoveCommand extends VivaEngageCommand {
27
23
  __classPrivateFieldGet(this, _VivaEngageGroupUserRemoveCommand_instances, "m", _VivaEngageGroupUserRemoveCommand_initValidators).call(this);
28
24
  }
29
25
  async commandAction(logger, args) {
30
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
31
26
  if (args.options.force) {
32
27
  await this.executeRemoveAction(args.options);
33
28
  }
@@ -7,7 +7,6 @@ var _VivaEngageMessageAddCommand_instances, _VivaEngageMessageAddCommand_initTel
7
7
  import request from '../../../../request.js';
8
8
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
9
9
  import commands from '../../commands.js';
10
- import yammerCommands from './yammerCommands.js';
11
10
  class VivaEngageMessageAddCommand extends VivaEngageCommand {
12
11
  get name() {
13
12
  return commands.ENGAGE_MESSAGE_ADD;
@@ -15,9 +14,6 @@ class VivaEngageMessageAddCommand extends VivaEngageCommand {
15
14
  get description() {
16
15
  return 'Posts a Viva Engage network message on behalf of the current user';
17
16
  }
18
- alias() {
19
- return [yammerCommands.MESSAGE_ADD];
20
- }
21
17
  defaultProperties() {
22
18
  return ['id'];
23
19
  }
@@ -29,7 +25,6 @@ class VivaEngageMessageAddCommand extends VivaEngageCommand {
29
25
  __classPrivateFieldGet(this, _VivaEngageMessageAddCommand_instances, "m", _VivaEngageMessageAddCommand_initValidators).call(this);
30
26
  }
31
27
  async commandAction(logger, args) {
32
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
33
28
  const requestOptions = {
34
29
  url: `${this.resource}/v1/messages.json`,
35
30
  headers: {
@@ -7,7 +7,6 @@ var _VivaEngageMessageGetCommand_instances, _VivaEngageMessageGetCommand_initOpt
7
7
  import request from '../../../../request.js';
8
8
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
9
9
  import commands from '../../commands.js';
10
- import yammerCommands from './yammerCommands.js';
11
10
  class VivaEngageMessageGetCommand extends VivaEngageCommand {
12
11
  get name() {
13
12
  return commands.ENGAGE_MESSAGE_GET;
@@ -15,9 +14,6 @@ class VivaEngageMessageGetCommand extends VivaEngageCommand {
15
14
  get description() {
16
15
  return 'Returns a Viva Engage message';
17
16
  }
18
- alias() {
19
- return [yammerCommands.MESSAGE_GET];
20
- }
21
17
  defaultProperties() {
22
18
  return ['id', 'sender_id', 'replied_to_id', 'thread_id', 'group_id', 'created_at', 'direct_message', 'system_message', 'privacy', 'message_type', 'content_excerpt'];
23
19
  }
@@ -28,7 +24,6 @@ class VivaEngageMessageGetCommand extends VivaEngageCommand {
28
24
  __classPrivateFieldGet(this, _VivaEngageMessageGetCommand_instances, "m", _VivaEngageMessageGetCommand_initValidators).call(this);
29
25
  }
30
26
  async commandAction(logger, args) {
31
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
32
27
  const requestOptions = {
33
28
  url: `${this.resource}/v1/messages/${args.options.id}.json`,
34
29
  headers: {
@@ -8,7 +8,6 @@ import { cli } from '../../../../cli/cli.js';
8
8
  import request from '../../../../request.js';
9
9
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
10
10
  import commands from '../../commands.js';
11
- import yammerCommands from './yammerCommands.js';
12
11
  class VivaEngageMessageLikeSetCommand extends VivaEngageCommand {
13
12
  get name() {
14
13
  return commands.ENGAGE_MESSAGE_LIKE_SET;
@@ -16,9 +15,6 @@ class VivaEngageMessageLikeSetCommand extends VivaEngageCommand {
16
15
  get description() {
17
16
  return 'Likes or unlikes a Viva Engage message';
18
17
  }
19
- alias() {
20
- return [yammerCommands.MESSAGE_LIKE_SET];
21
- }
22
18
  constructor() {
23
19
  super();
24
20
  _VivaEngageMessageLikeSetCommand_instances.add(this);
@@ -28,7 +24,6 @@ class VivaEngageMessageLikeSetCommand extends VivaEngageCommand {
28
24
  __classPrivateFieldGet(this, _VivaEngageMessageLikeSetCommand_instances, "m", _VivaEngageMessageLikeSetCommand_initValidators).call(this);
29
25
  }
30
26
  async commandAction(logger, args) {
31
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
32
27
  if (args.options.enable === false) {
33
28
  if (args.options.force) {
34
29
  await this.executeLikeAction(args.options);
@@ -7,7 +7,6 @@ var _VivaEngageMessageListCommand_instances, _a, _VivaEngageMessageListCommand_i
7
7
  import request from '../../../../request.js';
8
8
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
9
9
  import commands from '../../commands.js';
10
- import yammerCommands from './yammerCommands.js';
11
10
  class VivaEngageMessageListCommand extends VivaEngageCommand {
12
11
  get name() {
13
12
  return commands.ENGAGE_MESSAGE_LIST;
@@ -15,9 +14,6 @@ class VivaEngageMessageListCommand extends VivaEngageCommand {
15
14
  get description() {
16
15
  return 'Returns all accessible messages from the user\'s Viva Engage network';
17
16
  }
18
- alias() {
19
- return [yammerCommands.MESSAGE_LIST];
20
- }
21
17
  defaultProperties() {
22
18
  return ['id', 'replied_to_id', 'thread_id', 'group_id', 'shortBody'];
23
19
  }
@@ -97,7 +93,6 @@ class VivaEngageMessageListCommand extends VivaEngageCommand {
97
93
  }
98
94
  }
99
95
  async commandAction(logger, args) {
100
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
101
96
  this.items = []; // this will reset the items array in interactive mode
102
97
  try {
103
98
  await this.getAllItems(logger, args, -1);
@@ -8,7 +8,6 @@ import { cli } from '../../../../cli/cli.js';
8
8
  import request from '../../../../request.js';
9
9
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
10
10
  import commands from '../../commands.js';
11
- import yammerCommands from './yammerCommands.js';
12
11
  class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
13
12
  get name() {
14
13
  return commands.ENGAGE_MESSAGE_REMOVE;
@@ -16,9 +15,6 @@ class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
16
15
  get description() {
17
16
  return 'Removes a Viva Engage message';
18
17
  }
19
- alias() {
20
- return [yammerCommands.MESSAGE_REMOVE];
21
- }
22
18
  constructor() {
23
19
  super();
24
20
  _VivaEngageMessageRemoveCommand_instances.add(this);
@@ -27,7 +23,6 @@ class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
27
23
  __classPrivateFieldGet(this, _VivaEngageMessageRemoveCommand_instances, "m", _VivaEngageMessageRemoveCommand_initValidators).call(this);
28
24
  }
29
25
  async commandAction(logger, args) {
30
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
31
26
  if (args.options.force) {
32
27
  await this.removeMessage(args.options);
33
28
  }
@@ -7,7 +7,6 @@ var _VivaEngageNetworkListCommand_instances, _VivaEngageNetworkListCommand_initT
7
7
  import request from '../../../../request.js';
8
8
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
9
9
  import commands from '../../commands.js';
10
- import yammerCommands from './yammerCommands.js';
11
10
  class VivaEngageNetworkListCommand extends VivaEngageCommand {
12
11
  get name() {
13
12
  return commands.ENGAGE_NETWORK_LIST;
@@ -15,9 +14,6 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
15
14
  get description() {
16
15
  return 'Returns a list of networks to which the current user has access';
17
16
  }
18
- alias() {
19
- return [yammerCommands.NETWORK_LIST];
20
- }
21
17
  defaultProperties() {
22
18
  return ['id', 'name', 'email', 'community', 'permalink', 'web_url'];
23
19
  }
@@ -28,7 +24,6 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
28
24
  __classPrivateFieldGet(this, _VivaEngageNetworkListCommand_instances, "m", _VivaEngageNetworkListCommand_initOptions).call(this);
29
25
  }
30
26
  async commandAction(logger, args) {
31
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
32
27
  const requestOptions = {
33
28
  url: `${this.resource}/v1/networks/current.json`,
34
29
  headers: {
@@ -1,23 +1,15 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportActivityCountsCommand extends PeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_ACTIVITYCOUNTS;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_ACTIVITYCOUNTS];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerActivityCounts';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets the trends on the amount of VivaEngage activity in your organization by how many messages were posted, read, and liked';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportActivityCountsCommand();
23
15
  //# sourceMappingURL=engage-report-activitycounts.js.map
@@ -1,23 +1,15 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportActivityUserCountsCommand extends PeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_ACTIVITYUSERCOUNTS;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_ACTIVITYUSERCOUNTS];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerActivityUserCounts';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets the trends on the number of unique users who posted, read, and liked Viva Engage messages';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportActivityUserCountsCommand();
23
15
  //# sourceMappingURL=engage-report-activityusercounts.js.map
@@ -1,23 +1,15 @@
1
1
  import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportActivityUserDetailCommand extends DateAndPeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_ACTIVITYUSERDETAIL;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_ACTIVITYUSERDETAIL];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerActivityUserDetail';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets details about Viva Engage activity by user';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportActivityUserDetailCommand();
23
15
  //# sourceMappingURL=engage-report-activityuserdetail.js.map
@@ -1,23 +1,15 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportDeviceUsageDistributionUserCountsCommand extends PeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_DEVICEUSAGEDISTRIBUTIONUSERCOUNTS;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_DEVICEUSAGEDISTRIBUTIONUSERCOUNTS];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerDeviceUsageDistributionUserCounts';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets the number of users by device type';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportDeviceUsageDistributionUserCountsCommand();
23
15
  //# sourceMappingURL=engage-report-deviceusagedistributionusercounts.js.map
@@ -1,23 +1,15 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportDeviceUsageUserCountsCommand extends PeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_DEVICEUSAGEUSERCOUNTS;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_DEVICEUSAGEUSERCOUNTS];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerDeviceUsageUserCounts';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets the number of daily users by device type';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportDeviceUsageUserCountsCommand();
23
15
  //# sourceMappingURL=engage-report-deviceusageusercounts.js.map
@@ -1,23 +1,15 @@
1
1
  import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportDeviceUsageUserDetailCommand extends DateAndPeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_DEVICEUSAGEUSERDETAIL;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_DEVICEUSAGEUSERDETAIL];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerDeviceUsageUserDetail';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets details about Viva Engage device usage by user';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportDeviceUsageUserDetailCommand();
23
15
  //# sourceMappingURL=engage-report-deviceusageuserdetail.js.map
@@ -1,23 +1,15 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportGroupsActivityCountsCommand extends PeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_GROUPSACTIVITYCOUNTS;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_GROUPSACTIVITYCOUNTS];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerGroupsActivityCounts';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets the number of Viva Engage messages posted, read, and liked in groups';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportGroupsActivityCountsCommand();
23
15
  //# sourceMappingURL=engage-report-groupsactivitycounts.js.map
@@ -1,23 +1,15 @@
1
1
  import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportGroupsActivityDetailCommand extends DateAndPeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_GROUPSACTIVITYDETAIL;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_GROUPSACTIVITYDETAIL];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerGroupsActivityDetail';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets details about Viva Engage groups activity by group';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportGroupsActivityDetailCommand();
23
15
  //# sourceMappingURL=engage-report-groupsactivitydetail.js.map
@@ -1,23 +1,15 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
- import yammerCommands from './yammerCommands.js';
4
3
  class VivaEngageReportGroupsActivityGroupCountsCommand extends PeriodBasedReport {
5
4
  get name() {
6
5
  return commands.ENGAGE_REPORT_GROUPSACTIVITYGROUPCOUNTS;
7
6
  }
8
- alias() {
9
- return [yammerCommands.REPORT_GROUPSACTIVITYGROUPCOUNTS];
10
- }
11
7
  get usageEndpoint() {
12
8
  return 'getYammerGroupsActivityGroupCounts';
13
9
  }
14
10
  get description() {
15
11
  return 'Gets the total number of groups that existed and how many included group conversation activity';
16
12
  }
17
- async commandAction(logger, args) {
18
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
- await super.commandAction(logger, args);
20
- }
21
13
  }
22
14
  export default new VivaEngageReportGroupsActivityGroupCountsCommand();
23
15
  //# sourceMappingURL=engage-report-groupsactivitygroupcounts.js.map
@@ -9,7 +9,6 @@ import request from '../../../../request.js';
9
9
  import { formatting } from '../../../../utils/formatting.js';
10
10
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
11
11
  import commands from '../../commands.js';
12
- import yammerCommands from './yammerCommands.js';
13
12
  class VivaEngageSearchCommand extends VivaEngageCommand {
14
13
  get name() {
15
14
  return commands.ENGAGE_SEARCH;
@@ -17,9 +16,6 @@ class VivaEngageSearchCommand extends VivaEngageCommand {
17
16
  get description() {
18
17
  return 'Returns a list of messages, users, topics and groups that match the specified query.';
19
18
  }
20
- alias() {
21
- return [yammerCommands.SEARCH];
22
- }
23
19
  constructor() {
24
20
  super();
25
21
  _VivaEngageSearchCommand_instances.add(this);
@@ -93,7 +89,6 @@ class VivaEngageSearchCommand extends VivaEngageCommand {
93
89
  }
94
90
  }
95
91
  async commandAction(logger, args) {
96
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
97
92
  this.summary = {
98
93
  messages: 0,
99
94
  groups: 0,
@@ -8,7 +8,6 @@ import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
10
10
  import commands from '../../commands.js';
11
- import yammerCommands from './yammerCommands.js';
12
11
  class VivaEngageUserGetCommand extends VivaEngageCommand {
13
12
  get name() {
14
13
  return commands.ENGAGE_USER_GET;
@@ -16,9 +15,6 @@ class VivaEngageUserGetCommand extends VivaEngageCommand {
16
15
  get description() {
17
16
  return 'Retrieves the current user or searches for a user by ID or e-mail';
18
17
  }
19
- alias() {
20
- return [yammerCommands.USER_GET];
21
- }
22
18
  defaultProperties() {
23
19
  return ['id', 'full_name', 'email', 'job_title', 'state', 'url'];
24
20
  }
@@ -30,7 +26,6 @@ class VivaEngageUserGetCommand extends VivaEngageCommand {
30
26
  __classPrivateFieldGet(this, _VivaEngageUserGetCommand_instances, "m", _VivaEngageUserGetCommand_initValidators).call(this);
31
27
  }
32
28
  async commandAction(logger, args) {
33
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
34
29
  let endPoint = `${this.resource}/v1/users/current.json`;
35
30
  if (args.options.id) {
36
31
  endPoint = `${this.resource}/v1/users/${args.options.id}.json`;
@@ -7,7 +7,6 @@ var _VivaEngageUserListCommand_instances, _VivaEngageUserListCommand_initTelemet
7
7
  import request from '../../../../request.js';
8
8
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
9
9
  import commands from '../../commands.js';
10
- import yammerCommands from './yammerCommands.js';
11
10
  class VivaEngageUserListCommand extends VivaEngageCommand {
12
11
  get name() {
13
12
  return commands.ENGAGE_USER_LIST;
@@ -15,9 +14,6 @@ class VivaEngageUserListCommand extends VivaEngageCommand {
15
14
  get description() {
16
15
  return 'Returns users from the current network';
17
16
  }
18
- alias() {
19
- return [yammerCommands.USER_LIST];
20
- }
21
17
  defaultProperties() {
22
18
  return ['id', 'full_name', 'email'];
23
19
  }
@@ -92,7 +88,6 @@ class VivaEngageUserListCommand extends VivaEngageCommand {
92
88
  });
93
89
  }
94
90
  async commandAction(logger, args) {
95
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
96
91
  this.items = []; // this will reset the items array in interactive mode
97
92
  try {
98
93
  await this.getAllItems(logger, args, 1);
@@ -21,7 +21,6 @@ const settingsNames = {
21
21
  prompt: 'prompt',
22
22
  promptListPageSize: 'promptListPageSize',
23
23
  showHelpOnFailure: 'showHelpOnFailure',
24
- showSpinner: 'showSpinner',
25
24
  tenantId: 'tenantId'
26
25
  };
27
26
  export { settingsNames };
package/dist/utils/spo.js CHANGED
@@ -12,6 +12,16 @@ import { RoleType } from '../m365/spo/commands/roledefinition/RoleType.js';
12
12
  import { entraGroup } from './entraGroup.js';
13
13
  import { SharingCapabilities } from '../m365/spo/commands/site/SharingCapabilities.js';
14
14
  import { setTimeout } from 'timers/promises';
15
+ export var CreateCopyJobsNameConflictBehavior;
16
+ (function (CreateCopyJobsNameConflictBehavior) {
17
+ CreateCopyJobsNameConflictBehavior[CreateCopyJobsNameConflictBehavior["Fail"] = 0] = "Fail";
18
+ CreateCopyJobsNameConflictBehavior[CreateCopyJobsNameConflictBehavior["Replace"] = 1] = "Replace";
19
+ CreateCopyJobsNameConflictBehavior[CreateCopyJobsNameConflictBehavior["Rename"] = 2] = "Rename";
20
+ })(CreateCopyJobsNameConflictBehavior || (CreateCopyJobsNameConflictBehavior = {}));
21
+ // Wrapping this into a settings object so we can alter the values in tests
22
+ export const settings = {
23
+ pollingInterval: 3000
24
+ };
15
25
  export const spo = {
16
26
  async getRequestDigest(siteUrl) {
17
27
  const requestOptions = {
@@ -1540,6 +1550,72 @@ export const spo = {
1540
1550
  const file = await request.get(requestOptions);
1541
1551
  return file;
1542
1552
  },
1553
+ /**
1554
+ * Create a SharePoint copy job to copy a file/folder to another location.
1555
+ * @param webUrl Absolute web URL where the source file/folder is located.
1556
+ * @param sourceUrl Absolute URL of the source file/folder.
1557
+ * @param destinationUrl Absolute URL of the destination folder.
1558
+ * @param options Options for the copy job.
1559
+ * @returns Copy job information. Use {@link spo.getCopyJobResult} to get the result of the copy job.
1560
+ */
1561
+ async createCopyJob(webUrl, sourceUrl, destinationUrl, options) {
1562
+ const requestOptions = {
1563
+ url: `${webUrl}/_api/Site/CreateCopyJobs`,
1564
+ headers: {
1565
+ accept: 'application/json;odata=nometadata'
1566
+ },
1567
+ responseType: 'json',
1568
+ data: {
1569
+ destinationUri: destinationUrl,
1570
+ exportObjectUris: [sourceUrl],
1571
+ options: {
1572
+ NameConflictBehavior: options?.nameConflictBehavior ?? CreateCopyJobsNameConflictBehavior.Fail,
1573
+ AllowSchemaMismatch: true,
1574
+ BypassSharedLock: !!options?.bypassSharedLock,
1575
+ IgnoreVersionHistory: !!options?.ignoreVersionHistory,
1576
+ IncludeItemPermissions: !!options?.includeItemPermissions,
1577
+ CustomizedItemName: options?.newName ? [options.newName] : undefined,
1578
+ SameWebCopyMoveOptimization: true,
1579
+ IsMoveMode: options?.operation === 'move'
1580
+ }
1581
+ }
1582
+ };
1583
+ const response = await request.post(requestOptions);
1584
+ return response.value[0];
1585
+ },
1586
+ /**
1587
+ * Poll until the copy job is finished and return the result.
1588
+ * @param webUrl Absolute web URL where the copy job was created.
1589
+ * @param copyJobInfo Information about the copy job.
1590
+ * @throws Error if the copy job has failed.
1591
+ * @returns Information about the destination object.
1592
+ */
1593
+ async getCopyJobResult(webUrl, copyJobInfo) {
1594
+ const requestOptions = {
1595
+ url: `${webUrl}/_api/Site/GetCopyJobProgress`,
1596
+ headers: {
1597
+ accept: 'application/json;odata=nometadata'
1598
+ },
1599
+ responseType: 'json',
1600
+ data: {
1601
+ copyJobInfo: copyJobInfo
1602
+ }
1603
+ };
1604
+ let progress = await request.post(requestOptions);
1605
+ while (progress.JobState !== 0) {
1606
+ await setTimeout(settings.pollingInterval);
1607
+ progress = await request.post(requestOptions);
1608
+ }
1609
+ const logs = progress.Logs.map(l => JSON.parse(l));
1610
+ // Check if the job has failed
1611
+ const errorLog = logs.find(l => l.Event === 'JobError');
1612
+ if (errorLog) {
1613
+ throw new Error(errorLog.Message);
1614
+ }
1615
+ // Get the destination object information
1616
+ const objectInfo = logs.find(l => l.Event === 'JobFinishedObjectInfo');
1617
+ return objectInfo;
1618
+ },
1543
1619
  /**
1544
1620
  * Gets the site collection URL for a given web URL using SP Admin site.
1545
1621
  * @param adminUrl The SharePoint admin URL
@@ -22,5 +22,4 @@ Setting name|Definition|Default value
22
22
  `prompt`|Prompts for missing values in required options and enables interactive selection when multiple values are available for a command that requires a specific value to be retrieved.|`true`
23
23
  `promptListPageSize`|By default, lists of choices longer than 7 will be paginated. Use this option to control how many choices will appear on the screen at once.|7
24
24
  `showHelpOnFailure`|Automatically display help when executing a command failed|`true`
25
- `showSpinner`|Display spinner when executing commands|`true`
26
25
  `tenantId`|ID of the default tenant to use when authenticating with|``
@@ -16,10 +16,10 @@ m365 app permission add [options]
16
16
  `--appId [appId]`
17
17
  : Client ID of the Microsoft Entra app registered in the .m365rc.json file to retrieve API permissions for.
18
18
 
19
- `--applicationPermission [applicationPermission]`
19
+ `--applicationPermissions [applicationPermissions]`
20
20
  : Space-separated list of application permissions to add.
21
21
 
22
- `--delegatedPermission [delegatedPermission]`
22
+ `--delegatedPermissions [delegatedPermissions]`
23
23
  : Space-separated list of delegated permissions to add.
24
24
 
25
25
  `--grantAdminConsent`
@@ -37,19 +37,19 @@ If you have multiple apps registered in your .m365rc.json file, you can specify
37
37
  Adds the specified application permissions to the default app registered in the _.m365rc.json_ file while granting admin consent.
38
38
 
39
39
  ```sh
40
- m365 app permission add --applicationPermission 'https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/User.Read.All' --grantAdminConsent
40
+ m365 app permission add --applicationPermissions 'https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/User.Read.All' --grantAdminConsent
41
41
  ```
42
42
 
43
43
  Adds the specified delegated permissions to the default app registered in the _.m365rc.json_ file without granting admin consent.
44
44
 
45
45
  ```sh
46
- m365 app permission add --delegatedPermission 'https://graph.microsoft.com/offline_access'
46
+ m365 app permission add --delegatedPermissions 'https://graph.microsoft.com/offline_access'
47
47
  ```
48
48
 
49
49
  Adds the specified application and delegated permissions to a specific app registered in the _.m365rc.json_ file while granting admin consent.
50
50
 
51
51
  ```sh
52
- m365 app permission add --appId '1663767b-4172-4519-bfd1-28e6ff19055b' --applicationPermission 'https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/User.Read.All' --delegatedPermission 'https://graph.microsoft.com/offline_access' --grantAdminConsent
52
+ m365 app permission add --appId '1663767b-4172-4519-bfd1-28e6ff19055b' --applicationPermissions 'https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/User.Read.All' --delegatedPermissions 'https://graph.microsoft.com/offline_access' --grantAdminConsent
53
53
  ```
54
54
 
55
55
  ## Response
@@ -16,7 +16,7 @@ m365 cli consent [options]
16
16
 
17
17
  ```md definition-list
18
18
  `-s, --service <service>`
19
- : Service for which to consent permissions. Allowed values: `VivaEngage`, (deprecated)`yammer`.
19
+ : Service for which to consent permissions. Allowed values: `VivaEngage`.
20
20
  ```
21
21
 
22
22
  <Global />