@pnp/cli-microsoft365 9.0.0-beta.f2c5f82 → 9.0.0

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 (85) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +11 -12
  4. package/dist/Command.js +1 -3
  5. package/dist/cli/cli.js +57 -8
  6. package/dist/config.js +60 -5
  7. package/dist/m365/app/commands/permission/permission-add.js +9 -9
  8. package/dist/m365/base/SpoCommand.js +1 -1
  9. package/dist/m365/cli/commands/cli-consent.js +9 -5
  10. package/dist/m365/cli/commands/cli-doctor.js +2 -2
  11. package/dist/m365/cli/commands/cli-reconsent.js +2 -3
  12. package/dist/m365/cli/commands/config/config-set.js +12 -3
  13. package/dist/m365/commands/login.js +38 -14
  14. package/dist/m365/commands/setup.js +256 -33
  15. package/dist/m365/commands/status.js +2 -2
  16. package/dist/m365/connection/commands/connection-list.js +4 -4
  17. package/dist/m365/entra/commands/app/app-add.js +52 -288
  18. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +13 -13
  19. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +18 -18
  20. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -1
  21. package/dist/m365/entra/commands/group/group-user-list.js +4 -4
  22. package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +4 -4
  23. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +3 -3
  24. package/dist/m365/entra/commands/m365group/m365group-user-list.js +9 -6
  25. package/dist/m365/onenote/commands/notebook/notebook-add.js +132 -0
  26. package/dist/m365/onenote/commands.js +1 -0
  27. package/dist/m365/outlook/commands/message/message-get.js +11 -11
  28. package/dist/m365/spfx/commands/project/DeployWorkflow.js +1 -1
  29. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +10 -1
  30. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +1 -0
  31. package/dist/m365/spo/commands/file/file-copy.js +34 -55
  32. package/dist/m365/spo/commands/folder/folder-set.js +4 -0
  33. package/dist/m365/spo/commands/list/list-list.js +4 -1
  34. package/dist/m365/spo/commands/site/site-appcatalog-remove.js +24 -48
  35. package/dist/m365/spo/commands/site/site-get.js +12 -16
  36. package/dist/m365/spo/commands/site/site-remove.js +7 -1
  37. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +22 -2
  38. package/dist/m365/spo/commands.js +1 -0
  39. package/dist/m365/viva/commands/engage/engage-group-list.js +5 -0
  40. package/dist/m365/viva/commands/engage/engage-group-user-add.js +5 -0
  41. package/dist/m365/viva/commands/engage/engage-group-user-remove.js +5 -0
  42. package/dist/m365/viva/commands/engage/engage-message-add.js +5 -0
  43. package/dist/m365/viva/commands/engage/engage-message-get.js +5 -0
  44. package/dist/m365/viva/commands/engage/engage-message-like-set.js +5 -0
  45. package/dist/m365/viva/commands/engage/engage-message-list.js +5 -0
  46. package/dist/m365/viva/commands/engage/engage-message-remove.js +5 -0
  47. package/dist/m365/viva/commands/engage/engage-network-list.js +5 -0
  48. package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +8 -0
  49. package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +8 -0
  50. package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +8 -0
  51. package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +8 -0
  52. package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +8 -0
  53. package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +8 -0
  54. package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +8 -0
  55. package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +8 -0
  56. package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +8 -0
  57. package/dist/m365/viva/commands/engage/engage-search.js +5 -0
  58. package/dist/m365/viva/commands/engage/engage-user-get.js +5 -0
  59. package/dist/m365/viva/commands/engage/engage-user-list.js +5 -0
  60. package/dist/m365/viva/commands/engage/yammerCommands.js +25 -0
  61. package/dist/settingsNames.js +7 -1
  62. package/dist/utils/entraApp.js +283 -0
  63. package/dist/utils/spo.js +0 -74
  64. package/docs/docs/_clisettings.mdx +6 -0
  65. package/docs/docs/cmd/app/permission/permission-add.mdx +5 -5
  66. package/docs/docs/cmd/cli/cli-consent.mdx +1 -1
  67. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +12 -12
  68. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +14 -14
  69. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +5 -5
  70. package/docs/docs/cmd/entra/group/group-user-list.mdx +7 -7
  71. package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +5 -5
  72. package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +3 -3
  73. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +1 -1
  74. package/docs/docs/cmd/onenote/notebook/notebook-add.mdx +169 -0
  75. package/docs/docs/cmd/outlook/message/message-get.mdx +5 -5
  76. package/docs/docs/cmd/setup.mdx +16 -3
  77. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +12 -11
  78. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +5 -6
  79. package/docs/docs/cmd/spo/file/file-copy.mdx +12 -119
  80. package/docs/docs/cmd/spo/folder/folder-set.mdx +6 -0
  81. package/docs/docs/cmd/spo/list/list-list.mdx +7 -5
  82. package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +2 -11
  83. package/docs/docs/cmd/spo/site/site-remove.mdx +3 -0
  84. package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.mdx +49 -2
  85. package/package.json +2 -2
@@ -1,13 +1,17 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoSiteGetCommand_instances, _SpoSiteGetCommand_initOptions, _SpoSiteGetCommand_initValidators;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import request from '../../../../request.js';
8
4
  import { validation } from '../../../../utils/validation.js';
5
+ import { zod } from '../../../../utils/zod.js';
9
6
  import SpoCommand from '../../../base/SpoCommand.js';
10
7
  import commands from '../../commands.js';
8
+ const options = globalOptionsZod
9
+ .extend({
10
+ url: zod.alias('u', z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
11
+ message: 'Specify a valid SharePoint site URL'
12
+ }))
13
+ })
14
+ .strict();
11
15
  class SpoSiteGetCommand extends SpoCommand {
12
16
  get name() {
13
17
  return commands.SITE_GET;
@@ -15,11 +19,8 @@ class SpoSiteGetCommand extends SpoCommand {
15
19
  get description() {
16
20
  return 'Gets information about the specific site collection';
17
21
  }
18
- constructor() {
19
- super();
20
- _SpoSiteGetCommand_instances.add(this);
21
- __classPrivateFieldGet(this, _SpoSiteGetCommand_instances, "m", _SpoSiteGetCommand_initOptions).call(this);
22
- __classPrivateFieldGet(this, _SpoSiteGetCommand_instances, "m", _SpoSiteGetCommand_initValidators).call(this);
22
+ get schema() {
23
+ return options;
23
24
  }
24
25
  async commandAction(logger, args) {
25
26
  const requestOptions = {
@@ -38,10 +39,5 @@ class SpoSiteGetCommand extends SpoCommand {
38
39
  }
39
40
  }
40
41
  }
41
- _SpoSiteGetCommand_instances = new WeakSet(), _SpoSiteGetCommand_initOptions = function _SpoSiteGetCommand_initOptions() {
42
- this.options.unshift({ option: '-u, --url <url>' });
43
- }, _SpoSiteGetCommand_initValidators = function _SpoSiteGetCommand_initValidators() {
44
- this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.url));
45
- };
46
42
  export default new SpoSiteGetCommand();
47
43
  //# sourceMappingURL=site-get.js.map
@@ -31,6 +31,9 @@ class SpoSiteRemoveCommand extends SpoCommand {
31
31
  __classPrivateFieldGet(this, _SpoSiteRemoveCommand_instances, "m", _SpoSiteRemoveCommand_initTypes).call(this);
32
32
  }
33
33
  async commandAction(logger, args) {
34
+ if (args.options.wait) {
35
+ await this.warn(logger, `Option 'wait' is deprecated and will be removed in the next major release.`);
36
+ }
34
37
  if (args.options.force) {
35
38
  await this.removeSite(logger, args.options);
36
39
  }
@@ -193,6 +196,7 @@ _SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelem
193
196
  Object.assign(this.telemetryProperties, {
194
197
  skipRecycleBin: !!args.options.skipRecycleBin,
195
198
  fromRecycleBin: !!args.options.fromRecycleBin,
199
+ wait: !!args.options.wait,
196
200
  force: !!args.options.force
197
201
  });
198
202
  });
@@ -203,6 +207,8 @@ _SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelem
203
207
  option: '--skipRecycleBin'
204
208
  }, {
205
209
  option: '--fromRecycleBin'
210
+ }, {
211
+ option: '--wait'
206
212
  }, {
207
213
  option: '-f, --force'
208
214
  });
@@ -224,7 +230,7 @@ _SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelem
224
230
  });
225
231
  }, _SpoSiteRemoveCommand_initTypes = function _SpoSiteRemoveCommand_initTypes() {
226
232
  this.types.string.push('url');
227
- this.types.boolean.push('skipRecycleBin', 'fromRecycleBin', 'force');
233
+ this.types.boolean.push('skipRecycleBin', 'fromRecycleBin', 'wait', 'force');
228
234
  };
229
235
  export default new SpoSiteRemoveCommand();
230
236
  //# sourceMappingURL=site-remove.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 _SpoTenantRecycleBinItemRestoreCommand_instances, _SpoTenantRecycleBinItemRestoreCommand_initOptions, _SpoTenantRecycleBinItemRestoreCommand_initValidators, _SpoTenantRecycleBinItemRestoreCommand_initTypes;
6
+ var _SpoTenantRecycleBinItemRestoreCommand_instances, _SpoTenantRecycleBinItemRestoreCommand_initTelemetry, _SpoTenantRecycleBinItemRestoreCommand_initOptions, _SpoTenantRecycleBinItemRestoreCommand_initValidators, _SpoTenantRecycleBinItemRestoreCommand_initTypes;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { odata } from '../../../../utils/odata.js';
@@ -22,11 +22,15 @@ class SpoTenantRecycleBinItemRestoreCommand extends SpoCommand {
22
22
  constructor() {
23
23
  super();
24
24
  _SpoTenantRecycleBinItemRestoreCommand_instances.add(this);
25
+ __classPrivateFieldGet(this, _SpoTenantRecycleBinItemRestoreCommand_instances, "m", _SpoTenantRecycleBinItemRestoreCommand_initTelemetry).call(this);
25
26
  __classPrivateFieldGet(this, _SpoTenantRecycleBinItemRestoreCommand_instances, "m", _SpoTenantRecycleBinItemRestoreCommand_initOptions).call(this);
26
27
  __classPrivateFieldGet(this, _SpoTenantRecycleBinItemRestoreCommand_instances, "m", _SpoTenantRecycleBinItemRestoreCommand_initValidators).call(this);
27
28
  __classPrivateFieldGet(this, _SpoTenantRecycleBinItemRestoreCommand_instances, "m", _SpoTenantRecycleBinItemRestoreCommand_initTypes).call(this);
28
29
  }
29
30
  async commandAction(logger, args) {
31
+ if (args.options.wait) {
32
+ await this.warn(logger, `Option 'wait' is deprecated and will be removed in the next major release.`);
33
+ }
30
34
  try {
31
35
  if (this.verbose) {
32
36
  await logger.logToStderr(`Restoring site collection '${args.options.siteUrl}' from recycle bin.`);
@@ -58,6 +62,13 @@ class SpoTenantRecycleBinItemRestoreCommand extends SpoCommand {
58
62
  };
59
63
  await request.post(restoreOptions);
60
64
  }
65
+ // Here, we return a fixed response because this new API endpoint doesn't return a response while the previous API did.
66
+ // This has to be removed in the next major release.
67
+ await logger.log({
68
+ HasTimedout: false,
69
+ IsComplete: !!args.options.wait,
70
+ PollingInterval: 15000
71
+ });
61
72
  }
62
73
  catch (err) {
63
74
  this.handleRejectedODataJsonPromise(err);
@@ -68,14 +79,23 @@ class SpoTenantRecycleBinItemRestoreCommand extends SpoCommand {
68
79
  return sites[0].GroupId;
69
80
  }
70
81
  }
71
- _SpoTenantRecycleBinItemRestoreCommand_instances = new WeakSet(), _SpoTenantRecycleBinItemRestoreCommand_initOptions = function _SpoTenantRecycleBinItemRestoreCommand_initOptions() {
82
+ _SpoTenantRecycleBinItemRestoreCommand_instances = new WeakSet(), _SpoTenantRecycleBinItemRestoreCommand_initTelemetry = function _SpoTenantRecycleBinItemRestoreCommand_initTelemetry() {
83
+ this.telemetry.push((args) => {
84
+ Object.assign(this.telemetryProperties, {
85
+ wait: !!args.options.wait
86
+ });
87
+ });
88
+ }, _SpoTenantRecycleBinItemRestoreCommand_initOptions = function _SpoTenantRecycleBinItemRestoreCommand_initOptions() {
72
89
  this.options.unshift({
73
90
  option: '-u, --siteUrl <siteUrl>'
91
+ }, {
92
+ option: '--wait'
74
93
  });
75
94
  }, _SpoTenantRecycleBinItemRestoreCommand_initValidators = function _SpoTenantRecycleBinItemRestoreCommand_initValidators() {
76
95
  this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.siteUrl));
77
96
  }, _SpoTenantRecycleBinItemRestoreCommand_initTypes = function _SpoTenantRecycleBinItemRestoreCommand_initTypes() {
78
97
  this.types.string.push('siteUrl');
98
+ this.types.boolean.push('wait');
79
99
  };
80
100
  export default new SpoTenantRecycleBinItemRestoreCommand();
81
101
  //# sourceMappingURL=tenant-recyclebinitem-restore.js.map
@@ -92,6 +92,7 @@ export default {
92
92
  FOLDER_LIST: `${prefix} folder list`,
93
93
  FOLDER_MOVE: `${prefix} folder move`,
94
94
  FOLDER_REMOVE: `${prefix} folder remove`,
95
+ FOLDER_RENAME: `${prefix} folder rename`,
95
96
  FOLDER_SET: `${prefix} folder set`,
96
97
  FOLDER_RETENTIONLABEL_ENSURE: `${prefix} folder retentionlabel ensure`,
97
98
  FOLDER_RETENTIONLABEL_REMOVE: `${prefix} folder retentionlabel remove`,
@@ -7,6 +7,7 @@ var _VivaEngageGroupListCommand_instances, _VivaEngageGroupListCommand_initTelem
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';
10
11
  class VivaEngageGroupListCommand extends VivaEngageCommand {
11
12
  get name() {
12
13
  return commands.ENGAGE_GROUP_LIST;
@@ -14,6 +15,9 @@ class VivaEngageGroupListCommand extends VivaEngageCommand {
14
15
  get description() {
15
16
  return 'Returns the list of groups in a Viva Engage network or the groups for a specific user';
16
17
  }
18
+ alias() {
19
+ return [yammerCommands.GROUP_LIST];
20
+ }
17
21
  constructor() {
18
22
  super();
19
23
  _VivaEngageGroupListCommand_instances.add(this);
@@ -55,6 +59,7 @@ class VivaEngageGroupListCommand extends VivaEngageCommand {
55
59
  }
56
60
  }
57
61
  async commandAction(logger, args) {
62
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
58
63
  this.items = []; // this will reset the items array in interactive mode
59
64
  try {
60
65
  await this.getAllItems(logger, args, 1);
@@ -7,6 +7,7 @@ var _VivaEngageGroupUserAddCommand_instances, _VivaEngageGroupUserAddCommand_ini
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';
10
11
  class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
11
12
  get name() {
12
13
  return commands.ENGAGE_GROUP_USER_ADD;
@@ -14,6 +15,9 @@ class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
14
15
  get description() {
15
16
  return 'Adds a user to a Viva Engage Group';
16
17
  }
18
+ alias() {
19
+ return [yammerCommands.GROUP_USER_ADD];
20
+ }
17
21
  constructor() {
18
22
  super();
19
23
  _VivaEngageGroupUserAddCommand_instances.add(this);
@@ -22,6 +26,7 @@ class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
22
26
  __classPrivateFieldGet(this, _VivaEngageGroupUserAddCommand_instances, "m", _VivaEngageGroupUserAddCommand_initValidators).call(this);
23
27
  }
24
28
  async commandAction(logger, args) {
29
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
25
30
  const requestOptions = {
26
31
  url: `${this.resource}/v1/group_memberships.json`,
27
32
  headers: {
@@ -8,6 +8,7 @@ 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';
11
12
  class VivaEngageGroupUserRemoveCommand extends VivaEngageCommand {
12
13
  get name() {
13
14
  return commands.ENGAGE_GROUP_USER_REMOVE;
@@ -15,6 +16,9 @@ class VivaEngageGroupUserRemoveCommand extends VivaEngageCommand {
15
16
  get description() {
16
17
  return 'Removes a user from a Viva Engage group';
17
18
  }
19
+ alias() {
20
+ return [yammerCommands.GROUP_USER_REMOVE];
21
+ }
18
22
  constructor() {
19
23
  super();
20
24
  _VivaEngageGroupUserRemoveCommand_instances.add(this);
@@ -23,6 +27,7 @@ class VivaEngageGroupUserRemoveCommand extends VivaEngageCommand {
23
27
  __classPrivateFieldGet(this, _VivaEngageGroupUserRemoveCommand_instances, "m", _VivaEngageGroupUserRemoveCommand_initValidators).call(this);
24
28
  }
25
29
  async commandAction(logger, args) {
30
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
26
31
  if (args.options.force) {
27
32
  await this.executeRemoveAction(args.options);
28
33
  }
@@ -7,6 +7,7 @@ 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';
10
11
  class VivaEngageMessageAddCommand extends VivaEngageCommand {
11
12
  get name() {
12
13
  return commands.ENGAGE_MESSAGE_ADD;
@@ -14,6 +15,9 @@ class VivaEngageMessageAddCommand extends VivaEngageCommand {
14
15
  get description() {
15
16
  return 'Posts a Viva Engage network message on behalf of the current user';
16
17
  }
18
+ alias() {
19
+ return [yammerCommands.MESSAGE_ADD];
20
+ }
17
21
  defaultProperties() {
18
22
  return ['id'];
19
23
  }
@@ -25,6 +29,7 @@ class VivaEngageMessageAddCommand extends VivaEngageCommand {
25
29
  __classPrivateFieldGet(this, _VivaEngageMessageAddCommand_instances, "m", _VivaEngageMessageAddCommand_initValidators).call(this);
26
30
  }
27
31
  async commandAction(logger, args) {
32
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
28
33
  const requestOptions = {
29
34
  url: `${this.resource}/v1/messages.json`,
30
35
  headers: {
@@ -7,6 +7,7 @@ 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';
10
11
  class VivaEngageMessageGetCommand extends VivaEngageCommand {
11
12
  get name() {
12
13
  return commands.ENGAGE_MESSAGE_GET;
@@ -14,6 +15,9 @@ class VivaEngageMessageGetCommand extends VivaEngageCommand {
14
15
  get description() {
15
16
  return 'Returns a Viva Engage message';
16
17
  }
18
+ alias() {
19
+ return [yammerCommands.MESSAGE_GET];
20
+ }
17
21
  defaultProperties() {
18
22
  return ['id', 'sender_id', 'replied_to_id', 'thread_id', 'group_id', 'created_at', 'direct_message', 'system_message', 'privacy', 'message_type', 'content_excerpt'];
19
23
  }
@@ -24,6 +28,7 @@ class VivaEngageMessageGetCommand extends VivaEngageCommand {
24
28
  __classPrivateFieldGet(this, _VivaEngageMessageGetCommand_instances, "m", _VivaEngageMessageGetCommand_initValidators).call(this);
25
29
  }
26
30
  async commandAction(logger, args) {
31
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
27
32
  const requestOptions = {
28
33
  url: `${this.resource}/v1/messages/${args.options.id}.json`,
29
34
  headers: {
@@ -8,6 +8,7 @@ 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';
11
12
  class VivaEngageMessageLikeSetCommand extends VivaEngageCommand {
12
13
  get name() {
13
14
  return commands.ENGAGE_MESSAGE_LIKE_SET;
@@ -15,6 +16,9 @@ class VivaEngageMessageLikeSetCommand extends VivaEngageCommand {
15
16
  get description() {
16
17
  return 'Likes or unlikes a Viva Engage message';
17
18
  }
19
+ alias() {
20
+ return [yammerCommands.MESSAGE_LIKE_SET];
21
+ }
18
22
  constructor() {
19
23
  super();
20
24
  _VivaEngageMessageLikeSetCommand_instances.add(this);
@@ -24,6 +28,7 @@ class VivaEngageMessageLikeSetCommand extends VivaEngageCommand {
24
28
  __classPrivateFieldGet(this, _VivaEngageMessageLikeSetCommand_instances, "m", _VivaEngageMessageLikeSetCommand_initValidators).call(this);
25
29
  }
26
30
  async commandAction(logger, args) {
31
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
27
32
  if (args.options.enable === false) {
28
33
  if (args.options.force) {
29
34
  await this.executeLikeAction(args.options);
@@ -7,6 +7,7 @@ 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';
10
11
  class VivaEngageMessageListCommand extends VivaEngageCommand {
11
12
  get name() {
12
13
  return commands.ENGAGE_MESSAGE_LIST;
@@ -14,6 +15,9 @@ class VivaEngageMessageListCommand extends VivaEngageCommand {
14
15
  get description() {
15
16
  return 'Returns all accessible messages from the user\'s Viva Engage network';
16
17
  }
18
+ alias() {
19
+ return [yammerCommands.MESSAGE_LIST];
20
+ }
17
21
  defaultProperties() {
18
22
  return ['id', 'replied_to_id', 'thread_id', 'group_id', 'shortBody'];
19
23
  }
@@ -93,6 +97,7 @@ class VivaEngageMessageListCommand extends VivaEngageCommand {
93
97
  }
94
98
  }
95
99
  async commandAction(logger, args) {
100
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
96
101
  this.items = []; // this will reset the items array in interactive mode
97
102
  try {
98
103
  await this.getAllItems(logger, args, -1);
@@ -8,6 +8,7 @@ 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';
11
12
  class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
12
13
  get name() {
13
14
  return commands.ENGAGE_MESSAGE_REMOVE;
@@ -15,6 +16,9 @@ class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
15
16
  get description() {
16
17
  return 'Removes a Viva Engage message';
17
18
  }
19
+ alias() {
20
+ return [yammerCommands.MESSAGE_REMOVE];
21
+ }
18
22
  constructor() {
19
23
  super();
20
24
  _VivaEngageMessageRemoveCommand_instances.add(this);
@@ -23,6 +27,7 @@ class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
23
27
  __classPrivateFieldGet(this, _VivaEngageMessageRemoveCommand_instances, "m", _VivaEngageMessageRemoveCommand_initValidators).call(this);
24
28
  }
25
29
  async commandAction(logger, args) {
30
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
26
31
  if (args.options.force) {
27
32
  await this.removeMessage(args.options);
28
33
  }
@@ -7,6 +7,7 @@ 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';
10
11
  class VivaEngageNetworkListCommand extends VivaEngageCommand {
11
12
  get name() {
12
13
  return commands.ENGAGE_NETWORK_LIST;
@@ -14,6 +15,9 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
14
15
  get description() {
15
16
  return 'Returns a list of networks to which the current user has access';
16
17
  }
18
+ alias() {
19
+ return [yammerCommands.NETWORK_LIST];
20
+ }
17
21
  defaultProperties() {
18
22
  return ['id', 'name', 'email', 'community', 'permalink', 'web_url'];
19
23
  }
@@ -24,6 +28,7 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
24
28
  __classPrivateFieldGet(this, _VivaEngageNetworkListCommand_instances, "m", _VivaEngageNetworkListCommand_initOptions).call(this);
25
29
  }
26
30
  async commandAction(logger, args) {
31
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
27
32
  const requestOptions = {
28
33
  url: `${this.resource}/v1/networks/current.json`,
29
34
  headers: {
@@ -1,15 +1,23 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportActivityCountsCommand extends PeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_ACTIVITYCOUNTS;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_ACTIVITYCOUNTS];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerActivityCounts';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets the trends on the amount of VivaEngage activity in your organization by how many messages were posted, read, and liked';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportActivityCountsCommand();
15
23
  //# sourceMappingURL=engage-report-activitycounts.js.map
@@ -1,15 +1,23 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportActivityUserCountsCommand extends PeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_ACTIVITYUSERCOUNTS;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_ACTIVITYUSERCOUNTS];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerActivityUserCounts';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets the trends on the number of unique users who posted, read, and liked Viva Engage messages';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportActivityUserCountsCommand();
15
23
  //# sourceMappingURL=engage-report-activityusercounts.js.map
@@ -1,15 +1,23 @@
1
1
  import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportActivityUserDetailCommand extends DateAndPeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_ACTIVITYUSERDETAIL;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_ACTIVITYUSERDETAIL];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerActivityUserDetail';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets details about Viva Engage activity by user';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportActivityUserDetailCommand();
15
23
  //# sourceMappingURL=engage-report-activityuserdetail.js.map
@@ -1,15 +1,23 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportDeviceUsageDistributionUserCountsCommand extends PeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_DEVICEUSAGEDISTRIBUTIONUSERCOUNTS;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_DEVICEUSAGEDISTRIBUTIONUSERCOUNTS];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerDeviceUsageDistributionUserCounts';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets the number of users by device type';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportDeviceUsageDistributionUserCountsCommand();
15
23
  //# sourceMappingURL=engage-report-deviceusagedistributionusercounts.js.map
@@ -1,15 +1,23 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportDeviceUsageUserCountsCommand extends PeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_DEVICEUSAGEUSERCOUNTS;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_DEVICEUSAGEUSERCOUNTS];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerDeviceUsageUserCounts';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets the number of daily users by device type';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportDeviceUsageUserCountsCommand();
15
23
  //# sourceMappingURL=engage-report-deviceusageusercounts.js.map
@@ -1,15 +1,23 @@
1
1
  import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportDeviceUsageUserDetailCommand extends DateAndPeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_DEVICEUSAGEUSERDETAIL;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_DEVICEUSAGEUSERDETAIL];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerDeviceUsageUserDetail';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets details about Viva Engage device usage by user';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportDeviceUsageUserDetailCommand();
15
23
  //# sourceMappingURL=engage-report-deviceusageuserdetail.js.map
@@ -1,15 +1,23 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportGroupsActivityCountsCommand extends PeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_GROUPSACTIVITYCOUNTS;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_GROUPSACTIVITYCOUNTS];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerGroupsActivityCounts';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets the number of Viva Engage messages posted, read, and liked in groups';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportGroupsActivityCountsCommand();
15
23
  //# sourceMappingURL=engage-report-groupsactivitycounts.js.map
@@ -1,15 +1,23 @@
1
1
  import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportGroupsActivityDetailCommand extends DateAndPeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_GROUPSACTIVITYDETAIL;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_GROUPSACTIVITYDETAIL];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerGroupsActivityDetail';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets details about Viva Engage groups activity by group';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportGroupsActivityDetailCommand();
15
23
  //# sourceMappingURL=engage-report-groupsactivitydetail.js.map
@@ -1,15 +1,23 @@
1
1
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
2
  import commands from '../../commands.js';
3
+ import yammerCommands from './yammerCommands.js';
3
4
  class VivaEngageReportGroupsActivityGroupCountsCommand extends PeriodBasedReport {
4
5
  get name() {
5
6
  return commands.ENGAGE_REPORT_GROUPSACTIVITYGROUPCOUNTS;
6
7
  }
8
+ alias() {
9
+ return [yammerCommands.REPORT_GROUPSACTIVITYGROUPCOUNTS];
10
+ }
7
11
  get usageEndpoint() {
8
12
  return 'getYammerGroupsActivityGroupCounts';
9
13
  }
10
14
  get description() {
11
15
  return 'Gets the total number of groups that existed and how many included group conversation activity';
12
16
  }
17
+ async commandAction(logger, args) {
18
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
19
+ await super.commandAction(logger, args);
20
+ }
13
21
  }
14
22
  export default new VivaEngageReportGroupsActivityGroupCountsCommand();
15
23
  //# sourceMappingURL=engage-report-groupsactivitygroupcounts.js.map
@@ -9,6 +9,7 @@ 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';
12
13
  class VivaEngageSearchCommand extends VivaEngageCommand {
13
14
  get name() {
14
15
  return commands.ENGAGE_SEARCH;
@@ -16,6 +17,9 @@ class VivaEngageSearchCommand extends VivaEngageCommand {
16
17
  get description() {
17
18
  return 'Returns a list of messages, users, topics and groups that match the specified query.';
18
19
  }
20
+ alias() {
21
+ return [yammerCommands.SEARCH];
22
+ }
19
23
  constructor() {
20
24
  super();
21
25
  _VivaEngageSearchCommand_instances.add(this);
@@ -89,6 +93,7 @@ class VivaEngageSearchCommand extends VivaEngageCommand {
89
93
  }
90
94
  }
91
95
  async commandAction(logger, args) {
96
+ await this.showDeprecationWarning(logger, this.alias()[0], this.name);
92
97
  this.summary = {
93
98
  messages: 0,
94
99
  groups: 0,