@pnp/cli-microsoft365 7.5.0-beta.23612bc → 7.5.0-beta.4f8e5bf
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.
- package/.eslintrc.cjs +6 -2
- package/.mocharc.json +3 -5
- package/README.md +2 -2
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +171 -69
- package/dist/AuthServer.js +3 -3
- package/dist/Command.js +8 -5
- package/dist/auth/FileTokenStorage.js +4 -1
- package/dist/m365/base/AppCommand.js +2 -2
- package/dist/m365/base/PowerAppsCommand.js +2 -2
- package/dist/m365/base/PowerAutomateCommand.js +2 -2
- package/dist/m365/base/PowerPlatformCommand.js +2 -2
- package/dist/m365/base/SpoCommand.js +3 -3
- package/dist/m365/base/{YammerCommand.js → VivaEngageCommand.js} +2 -2
- package/dist/m365/cli/commands/cli-consent.js +5 -3
- package/dist/m365/cli/commands/cli-doctor.js +5 -5
- package/dist/m365/commands/ConnectionDetails.js +2 -0
- package/dist/m365/commands/login.js +26 -48
- package/dist/m365/commands/logout.js +2 -2
- package/dist/m365/commands/request.js +2 -2
- package/dist/m365/commands/status.js +15 -23
- package/dist/m365/connection/commands/connection-list.js +47 -0
- package/dist/m365/connection/commands/connection-remove.js +67 -0
- package/dist/m365/connection/commands/connection-set.js +56 -0
- package/dist/m365/connection/commands/connection-use.js +51 -0
- package/dist/m365/connection/commands.js +8 -0
- package/dist/m365/entra/aadCommands.js +3 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-remove.js +153 -0
- package/dist/m365/entra/commands/app/app-add.js +2 -2
- package/dist/m365/entra/commands/app/app-get.js +1 -1
- package/dist/m365/entra/commands/app/app-list.js +1 -1
- package/dist/m365/entra/commands/app/app-permission-add.js +1 -1
- package/dist/m365/entra/commands/app/app-permission-list.js +182 -0
- package/dist/m365/entra/commands/app/app-remove.js +1 -1
- package/dist/m365/entra/commands/app/app-role-add.js +1 -1
- package/dist/m365/entra/commands/app/app-role-list.js +1 -1
- package/dist/m365/entra/commands/app/app-role-remove.js +1 -1
- package/dist/m365/entra/commands/app/app-set.js +1 -1
- package/dist/m365/entra/commands/{sp/sp-add.js → enterpriseapp/enterpriseapp-add.js} +18 -18
- package/dist/m365/entra/commands/{sp/sp-get.js → enterpriseapp/enterpriseapp-get.js} +19 -19
- package/dist/m365/entra/commands/{sp/sp-list.js → enterpriseapp/enterpriseapp-list.js} +13 -13
- package/dist/m365/entra/commands/group/group-add.js +224 -0
- package/dist/m365/entra/commands/m365group/m365group-report-activitygroupcounts.js +1 -1
- package/dist/m365/entra/commands/user/user-get.js +38 -38
- package/dist/m365/entra/commands/user/user-license-list.js +1 -1
- package/dist/m365/entra/commands/user/user-registrationdetails-list.js +224 -0
- package/dist/m365/entra/commands/user/user-set.js +2 -2
- package/dist/m365/entra/commands.js +16 -0
- package/dist/m365/file/commands/convert/convert-pdf.js +1 -1
- package/dist/m365/file/commands/file-copy.js +151 -0
- package/dist/m365/file/commands.js +1 -0
- package/dist/m365/outlook/commands/mail/mail-send.js +1 -1
- package/dist/m365/outlook/commands/message/message-get.js +1 -1
- package/dist/m365/pa/commands/app/app-permission-ensure.js +1 -1
- package/dist/m365/pa/commands/app/app-permission-remove.js +1 -1
- package/dist/m365/planner/commands/roster/roster-plan-list.js +1 -1
- package/dist/m365/purview/commands/auditlog/auditlog-list.js +1 -1
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-get.js +1 -1
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-list.js +1 -1
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-policysettings-list.js +1 -1
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +4 -3
- package/dist/m365/spo/commands/spo-get.js +1 -1
- package/dist/m365/spo/commands/spo-search.js +52 -22
- package/dist/m365/spo/commands/spo-set.js +1 -1
- package/dist/m365/teams/commands/chat/chat-get.js +1 -1
- package/dist/m365/teams/commands/chat/chat-list.js +1 -1
- package/dist/m365/teams/commands/chat/chat-message-send.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-add.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-get.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-list.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +1 -1
- package/dist/m365/tenant/commands/id/id-get.js +1 -1
- package/dist/m365/tenant/commands/info/info-get.js +1 -1
- package/dist/m365/util/commands/accesstoken/accesstoken-get.js +3 -3
- package/dist/m365/{yammer/commands/group/group-list.js → viva/commands/engage/engage-group-list.js} +19 -14
- package/dist/m365/{yammer/commands/group/group-user-add.js → viva/commands/engage/engage-group-user-add.js} +19 -14
- package/dist/m365/{yammer/commands/group/group-user-remove.js → viva/commands/engage/engage-group-user-remove.js} +19 -14
- package/dist/m365/{yammer/commands/message/message-add.js → viva/commands/engage/engage-message-add.js} +19 -14
- package/dist/m365/{yammer/commands/message/message-get.js → viva/commands/engage/engage-message-get.js} +17 -12
- package/dist/m365/{yammer/commands/message/message-like-set.js → viva/commands/engage/engage-message-like-set.js} +21 -16
- package/dist/m365/{yammer/commands/message/message-list.js → viva/commands/engage/engage-message-list.js} +21 -16
- package/dist/m365/{yammer/commands/message/message-remove.js → viva/commands/engage/engage-message-remove.js} +20 -15
- package/dist/m365/{yammer/commands/network/network-list.js → viva/commands/engage/engage-network-list.js} +16 -11
- package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +23 -0
- package/dist/m365/{yammer/commands/yammer-search.js → viva/commands/engage/engage-search.js} +23 -18
- package/dist/m365/{yammer/commands/user/user-get.js → viva/commands/engage/engage-user-get.js} +18 -13
- package/dist/m365/{yammer/commands/user/user-list.js → viva/commands/engage/engage-user-list.js} +18 -13
- package/dist/m365/{yammer/commands.js → viva/commands/engage/yammerCommands.js} +1 -1
- package/dist/m365/viva/commands.js +22 -1
- package/dist/request.js +1 -1
- package/dist/utils/spo.js +36 -14
- package/dist/utils/urlUtil.js +31 -0
- package/dist/utils/validation.js +4 -0
- package/docs/docs/cmd/cli/cli-consent.mdx +9 -9
- package/docs/docs/cmd/connection/connection-list.mdx +100 -0
- package/docs/docs/cmd/connection/connection-remove.mdx +45 -0
- package/docs/docs/cmd/connection/connection-set.mdx +39 -0
- package/docs/docs/cmd/connection/connection-use.mdx +98 -0
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-add.mdx +5 -3
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-remove.mdx +107 -0
- package/docs/docs/cmd/entra/app/app-add.mdx +2 -1
- package/docs/docs/cmd/entra/app/app-get.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-list.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-permission-list.mdx +105 -0
- package/docs/docs/cmd/entra/app/app-remove.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-role-add.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-role-list.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-set.mdx +1 -0
- package/docs/docs/cmd/entra/{sp/sp-add.mdx → enterpriseapp/enterpriseapp-add.mdx} +16 -15
- package/docs/docs/cmd/entra/{sp/sp-get.mdx → enterpriseapp/enterpriseapp-get.mdx} +15 -14
- package/docs/docs/cmd/entra/{sp/sp-list.mdx → enterpriseapp/enterpriseapp-list.mdx} +22 -21
- package/docs/docs/cmd/entra/group/group-add.mdx +231 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitygroupcounts.mdx +1 -1
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +3 -3
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -1
- package/docs/docs/cmd/entra/user/user-registrationdetails-list.mdx +246 -0
- package/docs/docs/cmd/external/item/item-add.mdx +1 -1
- package/docs/docs/cmd/file/convert/convert-pdf.mdx +4 -0
- package/docs/docs/cmd/file/file-add.mdx +4 -0
- package/docs/docs/cmd/file/file-copy.mdx +68 -0
- package/docs/docs/cmd/file/file-list.mdx +100 -0
- package/docs/docs/cmd/login.mdx +15 -0
- package/docs/docs/cmd/setup.mdx +4 -0
- package/docs/docs/cmd/spo/list/list-webhook-set.mdx +1 -1
- package/docs/docs/cmd/spo/spo-search.mdx +6 -2
- package/docs/docs/cmd/spo/theme/theme-set.mdx +14 -2
- package/docs/docs/cmd/{yammer/group/group-list.mdx → viva/engage/engage-group-list.mdx} +13 -13
- package/docs/docs/cmd/{yammer/group/group-user-add.mdx → viva/engage/engage-group-user-add.mdx} +7 -7
- package/docs/docs/cmd/{yammer/group/group-user-remove.mdx → viva/engage/engage-group-user-remove.mdx} +10 -10
- package/docs/docs/cmd/{yammer/message/message-add.mdx → viva/engage/engage-message-add.mdx} +12 -13
- package/docs/docs/cmd/{yammer/message/message-get.mdx → viva/engage/engage-message-get.mdx} +10 -10
- package/docs/docs/cmd/{yammer/message/message-like-set.mdx → viva/engage/engage-message-like-set.mdx} +10 -10
- package/docs/docs/cmd/{yammer/message/message-list.mdx → viva/engage/engage-message-list.mdx} +21 -21
- package/docs/docs/cmd/{yammer/message/message-remove.mdx → viva/engage/engage-message-remove.mdx} +10 -10
- package/docs/docs/cmd/{yammer/network/network-list.mdx → viva/engage/engage-network-list.mdx} +6 -6
- package/docs/docs/cmd/{yammer/report/report-activitycounts.mdx → viva/engage/engage-report-activitycounts.mdx} +9 -9
- package/docs/docs/cmd/{yammer/report/report-activityusercounts.mdx → viva/engage/engage-report-activityusercounts.mdx} +9 -9
- package/docs/docs/cmd/{yammer/report/report-activityuserdetail.mdx → viva/engage/engage-report-activityuserdetail.mdx} +11 -12
- package/docs/docs/cmd/{yammer/report/report-deviceusagedistributionusercounts.mdx → viva/engage/engage-report-deviceusagedistributionusercounts.mdx} +5 -5
- package/docs/docs/cmd/{yammer/report/report-deviceusageusercounts.mdx → viva/engage/engage-report-deviceusageusercounts.mdx} +5 -5
- package/docs/docs/cmd/{yammer/report/report-deviceusageuserdetail.mdx → viva/engage/engage-report-deviceusageuserdetail.mdx} +11 -11
- package/docs/docs/cmd/{yammer/report/report-groupsactivitycounts.mdx → viva/engage/engage-report-groupsactivitycounts.mdx} +9 -9
- package/docs/docs/cmd/{yammer/report/report-groupsactivitydetail.mdx → viva/engage/engage-report-groupsactivitydetail.mdx} +11 -11
- package/docs/docs/cmd/{yammer/report/report-groupsactivitygroupcounts.mdx → viva/engage/engage-report-groupsactivitygroupcounts.mdx} +5 -5
- package/docs/docs/cmd/{yammer/yammer-search.mdx → viva/engage/engage-search.mdx} +10 -10
- package/docs/docs/cmd/{yammer/user/user-get.mdx → viva/engage/engage-user-get.mdx} +8 -8
- package/docs/docs/cmd/{yammer/user/user-list.mdx → viva/engage/engage-user-list.mdx} +11 -11
- package/npm-shrinkwrap.json +60 -0
- package/package.json +3 -2
- package/dist/m365/base/AzmgmtCommand.js +0 -18
- package/dist/m365/base/AzmgmtItemsListCommand.js +0 -41
- package/dist/m365/yammer/commands/report/report-activitycounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-activityusercounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-activityuserdetail.js +0 -15
- package/dist/m365/yammer/commands/report/report-deviceusagedistributionusercounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-deviceusageusercounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-deviceusageuserdetail.js +0 -15
- package/dist/m365/yammer/commands/report/report-groupsactivitycounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-groupsactivitydetail.js +0 -15
- package/dist/m365/yammer/commands/report/report-groupsactivitygroupcounts.js +0 -15
|
@@ -23,15 +23,15 @@ class UtilAccessTokenGetCommand extends Command {
|
|
|
23
23
|
async commandAction(logger, args) {
|
|
24
24
|
let resource = args.options.resource;
|
|
25
25
|
if (resource.toLowerCase() === 'sharepoint') {
|
|
26
|
-
if (auth.
|
|
27
|
-
resource = auth.
|
|
26
|
+
if (auth.connection.spoUrl) {
|
|
27
|
+
resource = auth.connection.spoUrl;
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
30
|
throw `SharePoint URL undefined. Use the 'm365 spo set --url https://contoso.sharepoint.com' command to set the URL`;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
else if (resource.toLowerCase() === 'graph') {
|
|
34
|
-
resource = Auth.getEndpointForResource('https://graph.microsoft.com', auth.
|
|
34
|
+
resource = Auth.getEndpointForResource('https://graph.microsoft.com', auth.connection.cloudType);
|
|
35
35
|
}
|
|
36
36
|
try {
|
|
37
37
|
const accessToken = await auth.ensureAccessToken(resource, logger, this.debug, args.options.new);
|
package/dist/m365/{yammer/commands/group/group-list.js → viva/commands/engage/engage-group-list.js}
RENAMED
|
@@ -3,24 +3,28 @@ 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
|
|
6
|
+
var _VivaEngageGroupListCommand_instances, _VivaEngageGroupListCommand_initTelemetry, _VivaEngageGroupListCommand_initOptions, _VivaEngageGroupListCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import
|
|
8
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
|
|
10
|
+
import yammerCommands from './yammerCommands.js';
|
|
11
|
+
class VivaEngageGroupListCommand extends VivaEngageCommand {
|
|
11
12
|
get name() {
|
|
12
|
-
return commands.
|
|
13
|
+
return commands.ENGAGE_GROUP_LIST;
|
|
13
14
|
}
|
|
14
15
|
get description() {
|
|
15
|
-
return 'Returns the list of groups in a
|
|
16
|
+
return 'Returns the list of groups in a Viva Engage network or the groups for a specific user';
|
|
17
|
+
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [yammerCommands.GROUP_LIST];
|
|
16
20
|
}
|
|
17
21
|
constructor() {
|
|
18
22
|
super();
|
|
19
|
-
|
|
23
|
+
_VivaEngageGroupListCommand_instances.add(this);
|
|
20
24
|
this.items = [];
|
|
21
|
-
__classPrivateFieldGet(this,
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
25
|
+
__classPrivateFieldGet(this, _VivaEngageGroupListCommand_instances, "m", _VivaEngageGroupListCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _VivaEngageGroupListCommand_instances, "m", _VivaEngageGroupListCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _VivaEngageGroupListCommand_instances, "m", _VivaEngageGroupListCommand_initValidators).call(this);
|
|
24
28
|
}
|
|
25
29
|
defaultProperties() {
|
|
26
30
|
return ['id', 'name', 'email', 'privacy', 'external', 'moderated'];
|
|
@@ -55,6 +59,7 @@ class YammerGroupListCommand extends YammerCommand {
|
|
|
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);
|
|
@@ -65,20 +70,20 @@ class YammerGroupListCommand extends YammerCommand {
|
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
}
|
|
68
|
-
|
|
73
|
+
_VivaEngageGroupListCommand_instances = new WeakSet(), _VivaEngageGroupListCommand_initTelemetry = function _VivaEngageGroupListCommand_initTelemetry() {
|
|
69
74
|
this.telemetry.push((args) => {
|
|
70
75
|
Object.assign(this.telemetryProperties, {
|
|
71
76
|
userId: args.options.userId !== undefined,
|
|
72
77
|
limit: args.options.limit !== undefined
|
|
73
78
|
});
|
|
74
79
|
});
|
|
75
|
-
},
|
|
80
|
+
}, _VivaEngageGroupListCommand_initOptions = function _VivaEngageGroupListCommand_initOptions() {
|
|
76
81
|
this.options.unshift({
|
|
77
82
|
option: '--userId [userId]'
|
|
78
83
|
}, {
|
|
79
84
|
option: '--limit [limit]'
|
|
80
85
|
});
|
|
81
|
-
},
|
|
86
|
+
}, _VivaEngageGroupListCommand_initValidators = function _VivaEngageGroupListCommand_initValidators() {
|
|
82
87
|
this.validators.push(async (args) => {
|
|
83
88
|
if (args.options.userId && typeof args.options.userId !== 'number') {
|
|
84
89
|
return `${args.options.userId} is not a number`;
|
|
@@ -89,5 +94,5 @@ _YammerGroupListCommand_instances = new WeakSet(), _YammerGroupListCommand_initT
|
|
|
89
94
|
return true;
|
|
90
95
|
});
|
|
91
96
|
};
|
|
92
|
-
export default new
|
|
93
|
-
//# sourceMappingURL=group-list.js.map
|
|
97
|
+
export default new VivaEngageGroupListCommand();
|
|
98
|
+
//# sourceMappingURL=engage-group-list.js.map
|
|
@@ -3,25 +3,30 @@ 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
|
|
6
|
+
var _VivaEngageGroupUserAddCommand_instances, _VivaEngageGroupUserAddCommand_initTelemetry, _VivaEngageGroupUserAddCommand_initOptions, _VivaEngageGroupUserAddCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import
|
|
8
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
|
|
10
|
+
import yammerCommands from './yammerCommands.js';
|
|
11
|
+
class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
|
|
11
12
|
get name() {
|
|
12
|
-
return commands.
|
|
13
|
+
return commands.ENGAGE_GROUP_USER_ADD;
|
|
13
14
|
}
|
|
14
15
|
get description() {
|
|
15
|
-
return 'Adds a user to a
|
|
16
|
+
return 'Adds a user to a Viva Engage Group';
|
|
17
|
+
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [yammerCommands.GROUP_USER_ADD];
|
|
16
20
|
}
|
|
17
21
|
constructor() {
|
|
18
22
|
super();
|
|
19
|
-
|
|
20
|
-
__classPrivateFieldGet(this,
|
|
21
|
-
__classPrivateFieldGet(this,
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
+
_VivaEngageGroupUserAddCommand_instances.add(this);
|
|
24
|
+
__classPrivateFieldGet(this, _VivaEngageGroupUserAddCommand_instances, "m", _VivaEngageGroupUserAddCommand_initTelemetry).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _VivaEngageGroupUserAddCommand_instances, "m", _VivaEngageGroupUserAddCommand_initOptions).call(this);
|
|
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: {
|
|
@@ -43,14 +48,14 @@ class YammerGroupUserAddCommand extends YammerCommand {
|
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
|
-
|
|
51
|
+
_VivaEngageGroupUserAddCommand_instances = new WeakSet(), _VivaEngageGroupUserAddCommand_initTelemetry = function _VivaEngageGroupUserAddCommand_initTelemetry() {
|
|
47
52
|
this.telemetry.push((args) => {
|
|
48
53
|
Object.assign(this.telemetryProperties, {
|
|
49
54
|
id: typeof args.options.id !== 'undefined',
|
|
50
55
|
email: typeof args.options.email !== 'undefined'
|
|
51
56
|
});
|
|
52
57
|
});
|
|
53
|
-
},
|
|
58
|
+
}, _VivaEngageGroupUserAddCommand_initOptions = function _VivaEngageGroupUserAddCommand_initOptions() {
|
|
54
59
|
this.options.unshift({
|
|
55
60
|
option: '--groupId <groupId>'
|
|
56
61
|
}, {
|
|
@@ -58,7 +63,7 @@ _YammerGroupUserAddCommand_instances = new WeakSet(), _YammerGroupUserAddCommand
|
|
|
58
63
|
}, {
|
|
59
64
|
option: '--email [email]'
|
|
60
65
|
});
|
|
61
|
-
},
|
|
66
|
+
}, _VivaEngageGroupUserAddCommand_initValidators = function _VivaEngageGroupUserAddCommand_initValidators() {
|
|
62
67
|
this.validators.push(async (args) => {
|
|
63
68
|
if (typeof args.options.groupId !== 'number') {
|
|
64
69
|
return `${args.options.groupId} is not a number`;
|
|
@@ -69,5 +74,5 @@ _YammerGroupUserAddCommand_instances = new WeakSet(), _YammerGroupUserAddCommand
|
|
|
69
74
|
return true;
|
|
70
75
|
});
|
|
71
76
|
};
|
|
72
|
-
export default new
|
|
73
|
-
//# sourceMappingURL=group-user-add.js.map
|
|
77
|
+
export default new VivaEngageGroupUserAddCommand();
|
|
78
|
+
//# sourceMappingURL=engage-group-user-add.js.map
|
|
@@ -3,26 +3,31 @@ 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
|
|
6
|
+
var _VivaEngageGroupUserRemoveCommand_instances, _VivaEngageGroupUserRemoveCommand_initTelemetry, _VivaEngageGroupUserRemoveCommand_initOptions, _VivaEngageGroupUserRemoveCommand_initValidators;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import
|
|
9
|
+
import VivaEngageCommand from "../../../base/VivaEngageCommand.js";
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
|
|
11
|
+
import yammerCommands from './yammerCommands.js';
|
|
12
|
+
class VivaEngageGroupUserRemoveCommand extends VivaEngageCommand {
|
|
12
13
|
get name() {
|
|
13
|
-
return commands.
|
|
14
|
+
return commands.ENGAGE_GROUP_USER_REMOVE;
|
|
14
15
|
}
|
|
15
16
|
get description() {
|
|
16
|
-
return 'Removes a user from a
|
|
17
|
+
return 'Removes a user from a Viva Engage group';
|
|
18
|
+
}
|
|
19
|
+
alias() {
|
|
20
|
+
return [yammerCommands.GROUP_USER_REMOVE];
|
|
17
21
|
}
|
|
18
22
|
constructor() {
|
|
19
23
|
super();
|
|
20
|
-
|
|
21
|
-
__classPrivateFieldGet(this,
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
+
_VivaEngageGroupUserRemoveCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _VivaEngageGroupUserRemoveCommand_instances, "m", _VivaEngageGroupUserRemoveCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _VivaEngageGroupUserRemoveCommand_instances, "m", _VivaEngageGroupUserRemoveCommand_initOptions).call(this);
|
|
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
|
}
|
|
@@ -58,14 +63,14 @@ class YammerGroupUserRemoveCommand extends YammerCommand {
|
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
|
-
|
|
66
|
+
_VivaEngageGroupUserRemoveCommand_instances = new WeakSet(), _VivaEngageGroupUserRemoveCommand_initTelemetry = function _VivaEngageGroupUserRemoveCommand_initTelemetry() {
|
|
62
67
|
this.telemetry.push((args) => {
|
|
63
68
|
Object.assign(this.telemetryProperties, {
|
|
64
69
|
userId: args.options.id !== undefined,
|
|
65
70
|
force: (!(!args.options.force)).toString()
|
|
66
71
|
});
|
|
67
72
|
});
|
|
68
|
-
},
|
|
73
|
+
}, _VivaEngageGroupUserRemoveCommand_initOptions = function _VivaEngageGroupUserRemoveCommand_initOptions() {
|
|
69
74
|
this.options.unshift({
|
|
70
75
|
option: '--groupId <groupId>'
|
|
71
76
|
}, {
|
|
@@ -73,7 +78,7 @@ _YammerGroupUserRemoveCommand_instances = new WeakSet(), _YammerGroupUserRemoveC
|
|
|
73
78
|
}, {
|
|
74
79
|
option: '-f, --force'
|
|
75
80
|
});
|
|
76
|
-
},
|
|
81
|
+
}, _VivaEngageGroupUserRemoveCommand_initValidators = function _VivaEngageGroupUserRemoveCommand_initValidators() {
|
|
77
82
|
this.validators.push(async (args) => {
|
|
78
83
|
if (args.options.groupId && typeof args.options.groupId !== 'number') {
|
|
79
84
|
return `${args.options.groupId} is not a number`;
|
|
@@ -84,5 +89,5 @@ _YammerGroupUserRemoveCommand_instances = new WeakSet(), _YammerGroupUserRemoveC
|
|
|
84
89
|
return true;
|
|
85
90
|
});
|
|
86
91
|
};
|
|
87
|
-
export default new
|
|
88
|
-
//# sourceMappingURL=group-user-remove.js.map
|
|
92
|
+
export default new VivaEngageGroupUserRemoveCommand();
|
|
93
|
+
//# sourceMappingURL=engage-group-user-remove.js.map
|
|
@@ -3,28 +3,33 @@ 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
|
|
6
|
+
var _VivaEngageMessageAddCommand_instances, _VivaEngageMessageAddCommand_initTelemetry, _VivaEngageMessageAddCommand_initOptions, _VivaEngageMessageAddCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import
|
|
8
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
|
|
10
|
+
import yammerCommands from './yammerCommands.js';
|
|
11
|
+
class VivaEngageMessageAddCommand extends VivaEngageCommand {
|
|
11
12
|
get name() {
|
|
12
|
-
return commands.
|
|
13
|
+
return commands.ENGAGE_MESSAGE_ADD;
|
|
13
14
|
}
|
|
14
15
|
get description() {
|
|
15
|
-
return 'Posts a
|
|
16
|
+
return 'Posts a Viva Engage network message on behalf of the current user';
|
|
17
|
+
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [yammerCommands.MESSAGE_ADD];
|
|
16
20
|
}
|
|
17
21
|
defaultProperties() {
|
|
18
22
|
return ['id'];
|
|
19
23
|
}
|
|
20
24
|
constructor() {
|
|
21
25
|
super();
|
|
22
|
-
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
+
_VivaEngageMessageAddCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _VivaEngageMessageAddCommand_instances, "m", _VivaEngageMessageAddCommand_initTelemetry).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _VivaEngageMessageAddCommand_instances, "m", _VivaEngageMessageAddCommand_initOptions).call(this);
|
|
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: {
|
|
@@ -53,7 +58,7 @@ class YammerMessageAddCommand extends YammerCommand {
|
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
|
-
|
|
61
|
+
_VivaEngageMessageAddCommand_instances = new WeakSet(), _VivaEngageMessageAddCommand_initTelemetry = function _VivaEngageMessageAddCommand_initTelemetry() {
|
|
57
62
|
this.telemetry.push((args) => {
|
|
58
63
|
Object.assign(this.telemetryProperties, {
|
|
59
64
|
repliedToId: args.options.repliedToId !== undefined,
|
|
@@ -62,7 +67,7 @@ _YammerMessageAddCommand_instances = new WeakSet(), _YammerMessageAddCommand_ini
|
|
|
62
67
|
networkId: args.options.networkId !== undefined
|
|
63
68
|
});
|
|
64
69
|
});
|
|
65
|
-
},
|
|
70
|
+
}, _VivaEngageMessageAddCommand_initOptions = function _VivaEngageMessageAddCommand_initOptions() {
|
|
66
71
|
this.options.unshift({
|
|
67
72
|
option: '-b, --body <body>'
|
|
68
73
|
}, {
|
|
@@ -74,7 +79,7 @@ _YammerMessageAddCommand_instances = new WeakSet(), _YammerMessageAddCommand_ini
|
|
|
74
79
|
}, {
|
|
75
80
|
option: '--networkId [networkId]'
|
|
76
81
|
});
|
|
77
|
-
},
|
|
82
|
+
}, _VivaEngageMessageAddCommand_initValidators = function _VivaEngageMessageAddCommand_initValidators() {
|
|
78
83
|
this.validators.push(async (args) => {
|
|
79
84
|
if (args.options.groupId && typeof args.options.groupId !== 'number') {
|
|
80
85
|
return `${args.options.groupId} is not a number`;
|
|
@@ -93,5 +98,5 @@ _YammerMessageAddCommand_instances = new WeakSet(), _YammerMessageAddCommand_ini
|
|
|
93
98
|
return true;
|
|
94
99
|
});
|
|
95
100
|
};
|
|
96
|
-
export default new
|
|
97
|
-
//# sourceMappingURL=message-add.js.map
|
|
101
|
+
export default new VivaEngageMessageAddCommand();
|
|
102
|
+
//# sourceMappingURL=engage-message-add.js.map
|
|
@@ -3,27 +3,32 @@ 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
|
|
6
|
+
var _VivaEngageMessageGetCommand_instances, _VivaEngageMessageGetCommand_initOptions, _VivaEngageMessageGetCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import
|
|
8
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
|
|
10
|
+
import yammerCommands from './yammerCommands.js';
|
|
11
|
+
class VivaEngageMessageGetCommand extends VivaEngageCommand {
|
|
11
12
|
get name() {
|
|
12
|
-
return commands.
|
|
13
|
+
return commands.ENGAGE_MESSAGE_GET;
|
|
13
14
|
}
|
|
14
15
|
get description() {
|
|
15
|
-
return 'Returns a
|
|
16
|
+
return 'Returns a Viva Engage message';
|
|
17
|
+
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [yammerCommands.MESSAGE_GET];
|
|
16
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
|
}
|
|
20
24
|
constructor() {
|
|
21
25
|
super();
|
|
22
|
-
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
26
|
+
_VivaEngageMessageGetCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _VivaEngageMessageGetCommand_instances, "m", _VivaEngageMessageGetCommand_initOptions).call(this);
|
|
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: {
|
|
@@ -41,11 +46,11 @@ class YammerMessageGetCommand extends YammerCommand {
|
|
|
41
46
|
}
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
|
-
|
|
49
|
+
_VivaEngageMessageGetCommand_instances = new WeakSet(), _VivaEngageMessageGetCommand_initOptions = function _VivaEngageMessageGetCommand_initOptions() {
|
|
45
50
|
this.options.unshift({
|
|
46
51
|
option: '--id <id>'
|
|
47
52
|
});
|
|
48
|
-
},
|
|
53
|
+
}, _VivaEngageMessageGetCommand_initValidators = function _VivaEngageMessageGetCommand_initValidators() {
|
|
49
54
|
this.validators.push(async (args) => {
|
|
50
55
|
if (typeof args.options.id !== 'number') {
|
|
51
56
|
return `${args.options.id} is not a number`;
|
|
@@ -53,5 +58,5 @@ _YammerMessageGetCommand_instances = new WeakSet(), _YammerMessageGetCommand_ini
|
|
|
53
58
|
return true;
|
|
54
59
|
});
|
|
55
60
|
};
|
|
56
|
-
export default new
|
|
57
|
-
//# sourceMappingURL=message-get.js.map
|
|
61
|
+
export default new VivaEngageMessageGetCommand();
|
|
62
|
+
//# sourceMappingURL=engage-message-get.js.map
|
|
@@ -3,27 +3,32 @@ 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
|
|
6
|
+
var _VivaEngageMessageLikeSetCommand_instances, _VivaEngageMessageLikeSetCommand_initTelemetry, _VivaEngageMessageLikeSetCommand_initOptions, _VivaEngageMessageLikeSetCommand_initTypes, _VivaEngageMessageLikeSetCommand_initValidators;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import
|
|
9
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
|
|
11
|
+
import yammerCommands from './yammerCommands.js';
|
|
12
|
+
class VivaEngageMessageLikeSetCommand extends VivaEngageCommand {
|
|
12
13
|
get name() {
|
|
13
|
-
return commands.
|
|
14
|
+
return commands.ENGAGE_MESSAGE_LIKE_SET;
|
|
14
15
|
}
|
|
15
16
|
get description() {
|
|
16
|
-
return 'Likes or unlikes a
|
|
17
|
+
return 'Likes or unlikes a Viva Engage message';
|
|
18
|
+
}
|
|
19
|
+
alias() {
|
|
20
|
+
return [yammerCommands.MESSAGE_LIKE_SET];
|
|
17
21
|
}
|
|
18
22
|
constructor() {
|
|
19
23
|
super();
|
|
20
|
-
|
|
21
|
-
__classPrivateFieldGet(this,
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
24
|
+
_VivaEngageMessageLikeSetCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _VivaEngageMessageLikeSetCommand_instances, "m", _VivaEngageMessageLikeSetCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _VivaEngageMessageLikeSetCommand_instances, "m", _VivaEngageMessageLikeSetCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _VivaEngageMessageLikeSetCommand_instances, "m", _VivaEngageMessageLikeSetCommand_initTypes).call(this);
|
|
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);
|
|
@@ -65,14 +70,14 @@ class YammerMessageLikeSetCommand extends YammerCommand {
|
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
}
|
|
68
|
-
|
|
73
|
+
_VivaEngageMessageLikeSetCommand_instances = new WeakSet(), _VivaEngageMessageLikeSetCommand_initTelemetry = function _VivaEngageMessageLikeSetCommand_initTelemetry() {
|
|
69
74
|
this.telemetry.push((args) => {
|
|
70
75
|
Object.assign(this.telemetryProperties, {
|
|
71
76
|
enable: args.options.enable,
|
|
72
77
|
force: (!(!args.options.force)).toString()
|
|
73
78
|
});
|
|
74
79
|
});
|
|
75
|
-
},
|
|
80
|
+
}, _VivaEngageMessageLikeSetCommand_initOptions = function _VivaEngageMessageLikeSetCommand_initOptions() {
|
|
76
81
|
this.options.unshift({
|
|
77
82
|
option: '--messageId <messageId>'
|
|
78
83
|
}, {
|
|
@@ -81,9 +86,9 @@ _YammerMessageLikeSetCommand_instances = new WeakSet(), _YammerMessageLikeSetCom
|
|
|
81
86
|
}, {
|
|
82
87
|
option: '-f, --force'
|
|
83
88
|
});
|
|
84
|
-
},
|
|
89
|
+
}, _VivaEngageMessageLikeSetCommand_initTypes = function _VivaEngageMessageLikeSetCommand_initTypes() {
|
|
85
90
|
this.types.boolean.push('enable');
|
|
86
|
-
},
|
|
91
|
+
}, _VivaEngageMessageLikeSetCommand_initValidators = function _VivaEngageMessageLikeSetCommand_initValidators() {
|
|
87
92
|
this.validators.push(async (args) => {
|
|
88
93
|
if (args.options.messageId && typeof args.options.messageId !== 'number') {
|
|
89
94
|
return `${args.options.messageId} is not a number`;
|
|
@@ -91,5 +96,5 @@ _YammerMessageLikeSetCommand_instances = new WeakSet(), _YammerMessageLikeSetCom
|
|
|
91
96
|
return true;
|
|
92
97
|
});
|
|
93
98
|
};
|
|
94
|
-
export default new
|
|
95
|
-
//# sourceMappingURL=message-like-set.js.map
|
|
99
|
+
export default new VivaEngageMessageLikeSetCommand();
|
|
100
|
+
//# sourceMappingURL=engage-message-like-set.js.map
|
|
@@ -3,27 +3,31 @@ 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
|
|
6
|
+
var _VivaEngageMessageListCommand_instances, _a, _VivaEngageMessageListCommand_initTelemetry, _VivaEngageMessageListCommand_initOptions, _VivaEngageMessageListCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import
|
|
8
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
|
|
10
|
+
import yammerCommands from './yammerCommands.js';
|
|
11
|
+
class VivaEngageMessageListCommand extends VivaEngageCommand {
|
|
11
12
|
get name() {
|
|
12
|
-
return commands.
|
|
13
|
+
return commands.ENGAGE_MESSAGE_LIST;
|
|
13
14
|
}
|
|
14
15
|
get description() {
|
|
15
|
-
return 'Returns all accessible messages from the user\'s
|
|
16
|
+
return 'Returns all accessible messages from the user\'s Viva Engage network';
|
|
17
|
+
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [yammerCommands.MESSAGE_LIST];
|
|
16
20
|
}
|
|
17
21
|
defaultProperties() {
|
|
18
22
|
return ['id', 'replied_to_id', 'thread_id', 'group_id', 'shortBody'];
|
|
19
23
|
}
|
|
20
24
|
constructor() {
|
|
21
25
|
super();
|
|
22
|
-
|
|
26
|
+
_VivaEngageMessageListCommand_instances.add(this);
|
|
23
27
|
this.items = [];
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
28
|
+
__classPrivateFieldGet(this, _VivaEngageMessageListCommand_instances, "m", _VivaEngageMessageListCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _VivaEngageMessageListCommand_instances, "m", _VivaEngageMessageListCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _VivaEngageMessageListCommand_instances, "m", _VivaEngageMessageListCommand_initValidators).call(this);
|
|
27
31
|
}
|
|
28
32
|
async getAllItems(logger, args, messageId) {
|
|
29
33
|
let endpoint = `${this.resource}/v1`;
|
|
@@ -93,6 +97,7 @@ class YammerMessageListCommand extends YammerCommand {
|
|
|
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);
|
|
@@ -117,7 +122,7 @@ class YammerMessageListCommand extends YammerCommand {
|
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
}
|
|
120
|
-
_a =
|
|
125
|
+
_a = VivaEngageMessageListCommand, _VivaEngageMessageListCommand_instances = new WeakSet(), _VivaEngageMessageListCommand_initTelemetry = function _VivaEngageMessageListCommand_initTelemetry() {
|
|
121
126
|
this.telemetry.push((args) => {
|
|
122
127
|
Object.assign(this.telemetryProperties, {
|
|
123
128
|
olderThanId: args.options.olderThanId !== undefined,
|
|
@@ -128,7 +133,7 @@ _a = YammerMessageListCommand, _YammerMessageListCommand_instances = new WeakSet
|
|
|
128
133
|
groupId: args.options.groupId !== undefined
|
|
129
134
|
});
|
|
130
135
|
});
|
|
131
|
-
},
|
|
136
|
+
}, _VivaEngageMessageListCommand_initOptions = function _VivaEngageMessageListCommand_initOptions() {
|
|
132
137
|
this.options.unshift({
|
|
133
138
|
option: '--olderThanId [olderThanId]'
|
|
134
139
|
}, {
|
|
@@ -143,7 +148,7 @@ _a = YammerMessageListCommand, _YammerMessageListCommand_instances = new WeakSet
|
|
|
143
148
|
}, {
|
|
144
149
|
option: '--limit [limit]'
|
|
145
150
|
});
|
|
146
|
-
},
|
|
151
|
+
}, _VivaEngageMessageListCommand_initValidators = function _VivaEngageMessageListCommand_initValidators() {
|
|
147
152
|
this.validators.push(async (args) => {
|
|
148
153
|
if (args.options.groupId && args.options.threadId) {
|
|
149
154
|
return `You cannot specify groupId and threadId at the same time`;
|
|
@@ -152,7 +157,7 @@ _a = YammerMessageListCommand, _YammerMessageListCommand_instances = new WeakSet
|
|
|
152
157
|
return `You cannot specify the feedType with groupId or threadId at the same time`;
|
|
153
158
|
}
|
|
154
159
|
if (args.options.feedType && _a.feedTypes.indexOf(args.options.feedType) < 0) {
|
|
155
|
-
return `${args.options.feedType} is not a valid value for the feedType option. Allowed values are ${_a.feedTypes.join('
|
|
160
|
+
return `${args.options.feedType} is not a valid value for the feedType option. Allowed values are ${_a.feedTypes.join(', ')}`;
|
|
156
161
|
}
|
|
157
162
|
if (args.options.olderThanId && typeof args.options.olderThanId !== 'number') {
|
|
158
163
|
return `${args.options.olderThanId} is not a number`;
|
|
@@ -169,6 +174,6 @@ _a = YammerMessageListCommand, _YammerMessageListCommand_instances = new WeakSet
|
|
|
169
174
|
return true;
|
|
170
175
|
});
|
|
171
176
|
};
|
|
172
|
-
|
|
173
|
-
export default new
|
|
174
|
-
//# sourceMappingURL=message-list.js.map
|
|
177
|
+
VivaEngageMessageListCommand.feedTypes = ['All', 'Top', 'My', 'Following', 'Sent', 'Private', 'Received'];
|
|
178
|
+
export default new VivaEngageMessageListCommand();
|
|
179
|
+
//# sourceMappingURL=engage-message-list.js.map
|