@pnp/cli-microsoft365 9.0.0-beta.e69e8d0 → 10.0.0-beta.48e9f7d

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 (47) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Command.js +1 -3
  4. package/dist/cli/cli.js +54 -14
  5. package/dist/m365/cli/commands/cli-consent.js +3 -7
  6. package/dist/m365/commands/login.js +10 -5
  7. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-remove.js +123 -0
  8. package/dist/m365/entra/commands/group/group-set.js +256 -0
  9. package/dist/m365/entra/commands.js +3 -0
  10. package/dist/m365/onenote/commands/notebook/notebook-add.js +132 -0
  11. package/dist/m365/onenote/commands.js +1 -0
  12. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +0 -1
  13. package/dist/m365/spo/commands/site/site-get.js +12 -16
  14. package/dist/m365/teams/commands/message/message-restore.js +106 -0
  15. package/dist/m365/teams/commands.js +1 -0
  16. package/dist/m365/viva/commands/engage/engage-group-list.js +0 -5
  17. package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -5
  18. package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -5
  19. package/dist/m365/viva/commands/engage/engage-message-add.js +0 -5
  20. package/dist/m365/viva/commands/engage/engage-message-get.js +0 -5
  21. package/dist/m365/viva/commands/engage/engage-message-like-set.js +0 -5
  22. package/dist/m365/viva/commands/engage/engage-message-list.js +0 -5
  23. package/dist/m365/viva/commands/engage/engage-message-remove.js +0 -5
  24. package/dist/m365/viva/commands/engage/engage-network-list.js +0 -5
  25. package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +0 -8
  26. package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +0 -8
  27. package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +0 -8
  28. package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +0 -8
  29. package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +0 -8
  30. package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +0 -8
  31. package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +0 -8
  32. package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +0 -8
  33. package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +0 -8
  34. package/dist/m365/viva/commands/engage/engage-search.js +0 -5
  35. package/dist/m365/viva/commands/engage/engage-user-get.js +0 -5
  36. package/dist/m365/viva/commands/engage/engage-user-list.js +0 -5
  37. package/docs/docs/cmd/cli/cli-consent.mdx +1 -1
  38. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-remove.mdx +65 -0
  39. package/docs/docs/cmd/entra/group/group-add.mdx +0 -4
  40. package/docs/docs/cmd/entra/group/group-set.mdx +89 -0
  41. package/docs/docs/cmd/onenote/notebook/notebook-add.mdx +169 -0
  42. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +6 -5
  43. package/docs/docs/cmd/teams/message/message-remove.mdx +2 -1
  44. package/docs/docs/cmd/teams/message/message-restore.mdx +62 -0
  45. package/npm-shrinkwrap.json +2 -3
  46. package/package.json +1 -2
  47. package/dist/m365/viva/commands/engage/yammerCommands.js +0 -25
@@ -0,0 +1,132 @@
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 _OneNoteNotebookAddCommand_instances, _OneNoteNotebookAddCommand_initTelemetry, _OneNoteNotebookAddCommand_initOptions, _OneNoteNotebookAddCommand_initValidators, _OneNoteNotebookAddCommand_initOptionSets;
7
+ import request from '../../../../request.js';
8
+ import { entraGroup } from '../../../../utils/entraGroup.js';
9
+ import { validation } from '../../../../utils/validation.js';
10
+ import GraphCommand from '../../../base/GraphCommand.js';
11
+ import commands from '../../commands.js';
12
+ import { spo } from '../../../../utils/spo.js';
13
+ class OneNoteNotebookAddCommand extends GraphCommand {
14
+ get name() {
15
+ return commands.NOTEBOOK_ADD;
16
+ }
17
+ get description() {
18
+ return 'Create a new OneNote notebook';
19
+ }
20
+ constructor() {
21
+ super();
22
+ _OneNoteNotebookAddCommand_instances.add(this);
23
+ __classPrivateFieldGet(this, _OneNoteNotebookAddCommand_instances, "m", _OneNoteNotebookAddCommand_initTelemetry).call(this);
24
+ __classPrivateFieldGet(this, _OneNoteNotebookAddCommand_instances, "m", _OneNoteNotebookAddCommand_initOptions).call(this);
25
+ __classPrivateFieldGet(this, _OneNoteNotebookAddCommand_instances, "m", _OneNoteNotebookAddCommand_initValidators).call(this);
26
+ __classPrivateFieldGet(this, _OneNoteNotebookAddCommand_instances, "m", _OneNoteNotebookAddCommand_initOptionSets).call(this);
27
+ }
28
+ async commandAction(logger, args) {
29
+ try {
30
+ if (this.verbose) {
31
+ await logger.logToStderr(`Creating OneNote notebook ${args.options.name}`);
32
+ }
33
+ const requestUrl = await this.getRequestUrl(args);
34
+ const requestOptions = {
35
+ url: requestUrl,
36
+ headers: {
37
+ accept: 'application/json;odata.metadata=none',
38
+ 'content-type': "application/json"
39
+ },
40
+ responseType: 'json',
41
+ data: {
42
+ displayName: args.options.name
43
+ }
44
+ };
45
+ const response = await request.post(requestOptions);
46
+ await logger.log(response);
47
+ }
48
+ catch (err) {
49
+ this.handleRejectedODataJsonPromise(err);
50
+ }
51
+ }
52
+ async getRequestUrl(args) {
53
+ let endpoint = `${this.resource}/v1.0/`;
54
+ if (args.options.userId) {
55
+ endpoint += `users/${args.options.userId}`;
56
+ }
57
+ else if (args.options.userName) {
58
+ endpoint += `users/${args.options.userName}`;
59
+ }
60
+ else if (args.options.groupId) {
61
+ endpoint += `groups/${args.options.groupId}`;
62
+ }
63
+ else if (args.options.groupName) {
64
+ const groupId = await entraGroup.getGroupIdByDisplayName(args.options.groupName);
65
+ endpoint += `groups/${groupId}`;
66
+ }
67
+ else if (args.options.webUrl) {
68
+ const siteId = await spo.getSpoGraphSiteId(args.options.webUrl);
69
+ endpoint += `sites/${siteId}`;
70
+ }
71
+ else {
72
+ endpoint += 'me';
73
+ }
74
+ endpoint += '/onenote/notebooks';
75
+ return endpoint;
76
+ }
77
+ }
78
+ _OneNoteNotebookAddCommand_instances = new WeakSet(), _OneNoteNotebookAddCommand_initTelemetry = function _OneNoteNotebookAddCommand_initTelemetry() {
79
+ this.telemetry.push((args) => {
80
+ Object.assign(this.telemetryProperties, {
81
+ userId: typeof args.options.userId !== 'undefined',
82
+ userName: typeof args.options.userName !== 'undefined',
83
+ groupId: typeof args.options.groupId !== 'undefined',
84
+ groupName: typeof args.options.groupName !== 'undefined',
85
+ webUrl: typeof args.options.webUrl !== 'undefined'
86
+ });
87
+ });
88
+ }, _OneNoteNotebookAddCommand_initOptions = function _OneNoteNotebookAddCommand_initOptions() {
89
+ this.options.unshift({
90
+ option: '-n, --name <name>'
91
+ }, {
92
+ option: '--userId [userId]'
93
+ }, {
94
+ option: '--userName [userName]'
95
+ }, {
96
+ option: '--groupId [groupId]'
97
+ }, {
98
+ option: '--groupName [groupName]'
99
+ }, {
100
+ option: '-u, --webUrl [webUrl]'
101
+ });
102
+ }, _OneNoteNotebookAddCommand_initValidators = function _OneNoteNotebookAddCommand_initValidators() {
103
+ this.validators.push(async (args) => {
104
+ // check name for invalid characters
105
+ if (args.options.name.length > 128) {
106
+ return 'The specified name is too long. It should be less than 128 characters';
107
+ }
108
+ if (/[?*/:<>|'"]/.test(args.options.name)) {
109
+ return `The specified name contains invalid characters. It cannot contain ?*/:<>|'". Please remove them and try again.`;
110
+ }
111
+ if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
112
+ return `${args.options.userId} is not a valid GUID`;
113
+ }
114
+ if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
115
+ return `${args.options.groupId} is not a valid GUID`;
116
+ }
117
+ if (args.options.webUrl) {
118
+ return validation.isValidSharePointUrl(args.options.webUrl);
119
+ }
120
+ return true;
121
+ });
122
+ }, _OneNoteNotebookAddCommand_initOptionSets = function _OneNoteNotebookAddCommand_initOptionSets() {
123
+ this.optionSets.push({
124
+ options: ['userId', 'userName', 'groupId', 'groupName', 'webUrl'],
125
+ runsWhen: (args) => {
126
+ const options = [args.options.userId, args.options.userName, args.options.groupId, args.options.groupName, args.options.webUrl];
127
+ return options.some(item => item !== undefined);
128
+ }
129
+ });
130
+ };
131
+ export default new OneNoteNotebookAddCommand();
132
+ //# sourceMappingURL=notebook-add.js.map
@@ -1,5 +1,6 @@
1
1
  const prefix = 'onenote';
2
2
  export default {
3
+ NOTEBOOK_ADD: `${prefix} notebook add`,
3
4
  NOTEBOOK_LIST: `${prefix} notebook list`,
4
5
  PAGE_LIST: `${prefix} page list`
5
6
  };
@@ -33,7 +33,6 @@ class SpoApplicationCustomizerGetCommand extends SpoCommand {
33
33
  if (!args.options.clientSideComponentProperties) {
34
34
  await logger.log({
35
35
  ...customAction,
36
- Rights: JSON.stringify(customAction.Rights),
37
36
  Scope: this.humanizeScope(customAction.Scope)
38
37
  });
39
38
  }
@@ -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
@@ -0,0 +1,106 @@
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 _TeamsMessageRestoreCommand_instances, _TeamsMessageRestoreCommand_initTelemetry, _TeamsMessageRestoreCommand_initOptions, _TeamsMessageRestoreCommand_initValidators, _TeamsMessageRestoreCommand_initOptionSets, _TeamsMessageRestoreCommand_initTypes;
7
+ import request from '../../../../request.js';
8
+ import { validation } from '../../../../utils/validation.js';
9
+ import commands from '../../commands.js';
10
+ import DelegatedGraphCommand from '../../../base/DelegatedGraphCommand.js';
11
+ import { teams } from '../../../../utils/teams.js';
12
+ class TeamsMessageRestoreCommand extends DelegatedGraphCommand {
13
+ get name() {
14
+ return commands.MESSAGE_RESTORE;
15
+ }
16
+ get description() {
17
+ return 'Restores a deleted message from a channel in a Microsoft Teams team';
18
+ }
19
+ constructor() {
20
+ super();
21
+ _TeamsMessageRestoreCommand_instances.add(this);
22
+ __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initTelemetry).call(this);
23
+ __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initOptions).call(this);
24
+ __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initValidators).call(this);
25
+ __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initOptionSets).call(this);
26
+ __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initTypes).call(this);
27
+ }
28
+ async commandAction(logger, args) {
29
+ try {
30
+ if (this.verbose) {
31
+ await logger.logToStderr(`Restoring deleted message '${args.options.id}' from channel '${args.options.channelId || args.options.channelName}' in the Microsoft Teams team '${args.options.teamId || args.options.teamName}'.`);
32
+ }
33
+ const teamId = await this.getTeamId(args.options, logger);
34
+ const channelId = await this.getChannelId(args.options, teamId, logger);
35
+ const requestOptions = {
36
+ url: `${this.resource}/v1.0/teams/${teamId}/channels/${channelId}/messages/${args.options.id}/undoSoftDelete`,
37
+ headers: {
38
+ accept: 'application/json;odata.metadata=none'
39
+ },
40
+ responseType: 'json'
41
+ };
42
+ await request.post(requestOptions);
43
+ }
44
+ catch (err) {
45
+ this.handleRejectedODataJsonPromise(err);
46
+ }
47
+ }
48
+ async getTeamId(options, logger) {
49
+ if (options.teamId) {
50
+ return options.teamId;
51
+ }
52
+ if (this.verbose) {
53
+ await logger.logToStderr(`Getting the Team ID.`);
54
+ }
55
+ const groupId = await teams.getTeamIdByDisplayName(options.teamName);
56
+ return groupId;
57
+ }
58
+ async getChannelId(options, teamId, logger) {
59
+ if (options.channelId) {
60
+ return options.channelId;
61
+ }
62
+ if (this.verbose) {
63
+ await logger.logToStderr(`Getting the channel ID.`);
64
+ }
65
+ const channelId = await teams.getChannelIdByDisplayName(teamId, options.channelName);
66
+ return channelId;
67
+ }
68
+ }
69
+ _TeamsMessageRestoreCommand_instances = new WeakSet(), _TeamsMessageRestoreCommand_initTelemetry = function _TeamsMessageRestoreCommand_initTelemetry() {
70
+ this.telemetry.push((args) => {
71
+ Object.assign(this.telemetryProperties, {
72
+ teamId: typeof args.options.teamId !== 'undefined',
73
+ teamName: typeof args.options.teamName !== 'undefined',
74
+ channelId: typeof args.options.channelId !== 'undefined',
75
+ channelName: typeof args.options.channelName !== 'undefined'
76
+ });
77
+ });
78
+ }, _TeamsMessageRestoreCommand_initOptions = function _TeamsMessageRestoreCommand_initOptions() {
79
+ this.options.unshift({
80
+ option: '--teamId [teamId]'
81
+ }, {
82
+ option: '--teamName [teamName]'
83
+ }, {
84
+ option: '--channelId [channelId]'
85
+ }, {
86
+ option: '--channelName [channelName]'
87
+ }, {
88
+ option: '-i, --id <id>'
89
+ });
90
+ }, _TeamsMessageRestoreCommand_initValidators = function _TeamsMessageRestoreCommand_initValidators() {
91
+ this.validators.push(async (args) => {
92
+ if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
93
+ return `'${args.options.teamId}' is not a valid GUID for 'teamId'.`;
94
+ }
95
+ if (args.options.channelId && !validation.isValidTeamsChannelId(args.options.channelId)) {
96
+ return `'${args.options.channelId}' is not a valid ID for 'channelId'.`;
97
+ }
98
+ return true;
99
+ });
100
+ }, _TeamsMessageRestoreCommand_initOptionSets = function _TeamsMessageRestoreCommand_initOptionSets() {
101
+ this.optionSets.push({ options: ['teamId', 'teamName'] }, { options: ['channelId', 'channelName'] });
102
+ }, _TeamsMessageRestoreCommand_initTypes = function _TeamsMessageRestoreCommand_initTypes() {
103
+ this.types.string.push('teamId', 'teamName', 'channelId', 'channelName', 'id');
104
+ };
105
+ export default new TeamsMessageRestoreCommand();
106
+ //# sourceMappingURL=message-restore.js.map
@@ -39,6 +39,7 @@ export default {
39
39
  MESSAGE_LIST: `${prefix} message list`,
40
40
  MESSAGE_REMOVE: `${prefix} message remove`,
41
41
  MESSAGE_REPLY_LIST: `${prefix} message reply list`,
42
+ MESSAGE_RESTORE: `${prefix} message restore`,
42
43
  MESSAGE_SEND: `${prefix} message send`,
43
44
  MESSAGINGSETTINGS_LIST: `${prefix} messagingsettings list`,
44
45
  MESSAGINGSETTINGS_SET: `${prefix} messagingsettings set`,
@@ -7,7 +7,6 @@ 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';
11
10
  class VivaEngageGroupListCommand extends VivaEngageCommand {
12
11
  get name() {
13
12
  return commands.ENGAGE_GROUP_LIST;
@@ -15,9 +14,6 @@ class VivaEngageGroupListCommand extends VivaEngageCommand {
15
14
  get description() {
16
15
  return 'Returns the list of groups in a Viva Engage network or the groups for a specific user';
17
16
  }
18
- alias() {
19
- return [yammerCommands.GROUP_LIST];
20
- }
21
17
  constructor() {
22
18
  super();
23
19
  _VivaEngageGroupListCommand_instances.add(this);
@@ -59,7 +55,6 @@ class VivaEngageGroupListCommand extends VivaEngageCommand {
59
55
  }
60
56
  }
61
57
  async commandAction(logger, args) {
62
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
63
58
  this.items = []; // this will reset the items array in interactive mode
64
59
  try {
65
60
  await this.getAllItems(logger, args, 1);
@@ -7,7 +7,6 @@ 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';
11
10
  class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
12
11
  get name() {
13
12
  return commands.ENGAGE_GROUP_USER_ADD;
@@ -15,9 +14,6 @@ class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
15
14
  get description() {
16
15
  return 'Adds a user to a Viva Engage Group';
17
16
  }
18
- alias() {
19
- return [yammerCommands.GROUP_USER_ADD];
20
- }
21
17
  constructor() {
22
18
  super();
23
19
  _VivaEngageGroupUserAddCommand_instances.add(this);
@@ -26,7 +22,6 @@ class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
26
22
  __classPrivateFieldGet(this, _VivaEngageGroupUserAddCommand_instances, "m", _VivaEngageGroupUserAddCommand_initValidators).call(this);
27
23
  }
28
24
  async commandAction(logger, args) {
29
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
30
25
  const requestOptions = {
31
26
  url: `${this.resource}/v1/group_memberships.json`,
32
27
  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 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