@pnp/cli-microsoft365 7.5.0-beta.23612bc → 7.5.0-beta.940b241
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/Command.js +1 -1
- package/dist/m365/base/AppCommand.js +2 -2
- package/dist/m365/base/{YammerCommand.js → VivaEngageCommand.js} +2 -2
- package/dist/m365/cli/commands/cli-consent.js +5 -3
- 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 +1 -1
- 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-registrationdetails-list.js +224 -0
- package/dist/m365/entra/commands.js +16 -0
- package/dist/m365/file/commands/file-copy.js +151 -0
- package/dist/m365/file/commands.js +1 -0
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +4 -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/utils/spo.js +22 -0
- 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/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/setup.mdx +4 -0
- package/docs/docs/cmd/spo/list/list-webhook-set.mdx +1 -1
- 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
|
@@ -0,0 +1,224 @@
|
|
|
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 _EntraUserRegistrationDetailsListCommand_instances, _EntraUserRegistrationDetailsListCommand_initTelemetry, _EntraUserRegistrationDetailsListCommand_initOptions, _EntraUserRegistrationDetailsListCommand_initValidators;
|
|
7
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
import aadCommands from '../../aadCommands.js';
|
|
10
|
+
import { odata } from '../../../../utils/odata.js';
|
|
11
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
12
|
+
import { validation } from '../../../../utils/validation.js';
|
|
13
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
14
|
+
const authenticationMethods = ['push', 'oath', 'voiceMobile', 'voiceAlternateMobile', 'voiceOffice', 'sms', 'none'];
|
|
15
|
+
const methodsRegistered = ['mobilePhone', 'email', 'fido2', 'microsoftAuthenticatorPush', 'softwareOneTimePasscode'];
|
|
16
|
+
class EntraUserRegistrationDetailsListCommand extends GraphCommand {
|
|
17
|
+
get name() {
|
|
18
|
+
return commands.USER_REGISTRATIONDETAILS_LIST;
|
|
19
|
+
}
|
|
20
|
+
get description() {
|
|
21
|
+
return 'Retrieves a list of the authentication methods registered for users';
|
|
22
|
+
}
|
|
23
|
+
alias() {
|
|
24
|
+
return [aadCommands.USER_REGISTRATIONDETAILS_LIST];
|
|
25
|
+
}
|
|
26
|
+
defaultProperties() {
|
|
27
|
+
return ['userPrincipalName', 'methodsRegistered', 'lastUpdatedDateTime'];
|
|
28
|
+
}
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
_EntraUserRegistrationDetailsListCommand_instances.add(this);
|
|
32
|
+
__classPrivateFieldGet(this, _EntraUserRegistrationDetailsListCommand_instances, "m", _EntraUserRegistrationDetailsListCommand_initTelemetry).call(this);
|
|
33
|
+
__classPrivateFieldGet(this, _EntraUserRegistrationDetailsListCommand_instances, "m", _EntraUserRegistrationDetailsListCommand_initOptions).call(this);
|
|
34
|
+
__classPrivateFieldGet(this, _EntraUserRegistrationDetailsListCommand_instances, "m", _EntraUserRegistrationDetailsListCommand_initValidators).call(this);
|
|
35
|
+
}
|
|
36
|
+
async commandAction(logger, args) {
|
|
37
|
+
try {
|
|
38
|
+
let userUpns = [];
|
|
39
|
+
if (args.options.userIds) {
|
|
40
|
+
const ids = args.options.userIds.split(',').map(m => m.trim());
|
|
41
|
+
userUpns = await Promise.all(ids.map(id => entraUser.getUpnByUserId(id)));
|
|
42
|
+
}
|
|
43
|
+
const requestUrl = this.getRequestUrl(args.options, userUpns);
|
|
44
|
+
const result = await odata.getAllItems(requestUrl);
|
|
45
|
+
await logger.log(result);
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
this.handleRejectedODataJsonPromise(err);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
getRequestUrl(options, userUpns) {
|
|
52
|
+
const queryParameters = [];
|
|
53
|
+
if (options.properties) {
|
|
54
|
+
queryParameters.push(`$select=${options.properties}`);
|
|
55
|
+
}
|
|
56
|
+
const filters = [];
|
|
57
|
+
if (options.isAdmin !== undefined) {
|
|
58
|
+
filters.push(`isAdmin eq ${options.isAdmin}`);
|
|
59
|
+
}
|
|
60
|
+
if (options.isMfaCapable !== undefined) {
|
|
61
|
+
filters.push(`isMfaCapable eq ${options.isMfaCapable}`);
|
|
62
|
+
}
|
|
63
|
+
if (options.isMfaRegistered !== undefined) {
|
|
64
|
+
filters.push(`isMfaRegistered eq ${options.isMfaRegistered}`);
|
|
65
|
+
}
|
|
66
|
+
if (options.isPasswordlessCapable !== undefined) {
|
|
67
|
+
filters.push(`isPasswordlessCapable eq ${options.isPasswordlessCapable}`);
|
|
68
|
+
}
|
|
69
|
+
if (options.isSelfServicePasswordResetCapable !== undefined) {
|
|
70
|
+
filters.push(`isSelfServicePasswordResetCapable eq ${options.isSelfServicePasswordResetCapable}`);
|
|
71
|
+
}
|
|
72
|
+
if (options.isSelfServicePasswordResetEnabled !== undefined) {
|
|
73
|
+
filters.push(`isSelfServicePasswordResetEnabled eq ${options.isSelfServicePasswordResetEnabled}`);
|
|
74
|
+
}
|
|
75
|
+
if (options.isSelfServicePasswordResetRegistered !== undefined) {
|
|
76
|
+
filters.push(`isSelfServicePasswordResetRegistered eq ${options.isSelfServicePasswordResetRegistered}`);
|
|
77
|
+
}
|
|
78
|
+
if (options.isSystemPreferredAuthenticationMethodEnabled !== undefined) {
|
|
79
|
+
filters.push(`isSystemPreferredAuthenticationMethodEnabled eq ${options.isSystemPreferredAuthenticationMethodEnabled}`);
|
|
80
|
+
}
|
|
81
|
+
const methodsRegistered = options.methodsRegistered?.split(',').map(method => `methodsRegistered/any(m:m eq '${method.trim()}')`);
|
|
82
|
+
const methodsRegisteredFilter = methodsRegistered?.join(' or ');
|
|
83
|
+
if (methodsRegisteredFilter) {
|
|
84
|
+
filters.push(`(${methodsRegisteredFilter})`);
|
|
85
|
+
}
|
|
86
|
+
const systemPreferredAuthenticationMethods = options.systemPreferredAuthenticationMethods?.split(',').map(method => `systemPreferredAuthenticationMethods/any(m:m eq '${method.trim()}')`);
|
|
87
|
+
const systemPreferredAuthenticationMethodsFilter = systemPreferredAuthenticationMethods?.join(' or ');
|
|
88
|
+
if (systemPreferredAuthenticationMethodsFilter) {
|
|
89
|
+
filters.push(`(${systemPreferredAuthenticationMethodsFilter})`);
|
|
90
|
+
}
|
|
91
|
+
const userUPNs = [];
|
|
92
|
+
if (userUpns.length > 0) {
|
|
93
|
+
userUpns.forEach(upn => {
|
|
94
|
+
userUPNs.push(`userPrincipalName eq '${formatting.encodeQueryParameter(upn)}'`);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (options.userPrincipalNames) {
|
|
98
|
+
const upns = options.userPrincipalNames.split(',').map(m => m.trim());
|
|
99
|
+
upns.forEach(upn => {
|
|
100
|
+
userUPNs.push(`userPrincipalName eq '${formatting.encodeQueryParameter(upn)}'`);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (userUPNs.length > 0) {
|
|
104
|
+
filters.push(`(${userUPNs.join(' or ')})`);
|
|
105
|
+
}
|
|
106
|
+
const userPreferredMethodForSecondaryAuthentication = options.userPreferredMethodForSecondaryAuthentication?.split(',').map(method => `userPreferredMethodForSecondaryAuthentication eq '${method.trim()}'`);
|
|
107
|
+
const userPreferredMethodForSecondaryAuthenticationFilter = userPreferredMethodForSecondaryAuthentication?.join(' or ');
|
|
108
|
+
if (userPreferredMethodForSecondaryAuthenticationFilter) {
|
|
109
|
+
filters.push(`(${userPreferredMethodForSecondaryAuthenticationFilter})`);
|
|
110
|
+
}
|
|
111
|
+
if (options.userType) {
|
|
112
|
+
filters.push(`userType eq '${options.userType}'`);
|
|
113
|
+
}
|
|
114
|
+
if (filters.length > 0) {
|
|
115
|
+
queryParameters.push(`$filter=${filters.join(' and ')}`);
|
|
116
|
+
}
|
|
117
|
+
const queryString = queryParameters.length > 0
|
|
118
|
+
? `?${queryParameters.join('&')}`
|
|
119
|
+
: '';
|
|
120
|
+
return `${this.resource}/v1.0/reports/authenticationMethods/userRegistrationDetails${queryString}`;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
_EntraUserRegistrationDetailsListCommand_instances = new WeakSet(), _EntraUserRegistrationDetailsListCommand_initTelemetry = function _EntraUserRegistrationDetailsListCommand_initTelemetry() {
|
|
124
|
+
this.telemetry.push((args) => {
|
|
125
|
+
Object.assign(this.telemetryProperties, {
|
|
126
|
+
isAdmin: !!args.options.isAdmin,
|
|
127
|
+
userType: typeof args.options.userType !== 'undefined',
|
|
128
|
+
userPreferredMethodForSecondaryAuthentication: typeof args.options.userPreferredMethodForSecondaryAuthentication !== 'undefined',
|
|
129
|
+
systemPreferredAuthenticationMethods: typeof args.options.systemPreferredAuthenticationMethods !== 'undefined',
|
|
130
|
+
isSelfServicePasswordResetRegistered: !!args.options.isSelfServicePasswordResetRegistered,
|
|
131
|
+
isSelfServicePasswordResetEnabled: !!args.options.isSelfServicePasswordResetEnabled,
|
|
132
|
+
isSelfServicePasswordResetCapable: !!args.options.isSelfServicePasswordResetCapable,
|
|
133
|
+
isMfaRegistered: !!args.options.isMfaRegistered,
|
|
134
|
+
isMfaCapable: !!args.options.isMfaCapable,
|
|
135
|
+
isPasswordlessCapable: !!args.options.isPasswordlessCapable,
|
|
136
|
+
isSystemPreferredAuthenticationMethodEnabled: !!args.options.isSystemPreferredAuthenticationMethodEnabled,
|
|
137
|
+
methodsRegistered: typeof args.options.methodsRegistered !== 'undefined',
|
|
138
|
+
userIds: typeof args.options.userIds !== 'undefined',
|
|
139
|
+
userPrincipalNames: typeof args.options.userPrincipalNames !== 'undefined',
|
|
140
|
+
properties: typeof args.options.properties !== 'undefined'
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
}, _EntraUserRegistrationDetailsListCommand_initOptions = function _EntraUserRegistrationDetailsListCommand_initOptions() {
|
|
144
|
+
this.options.unshift({
|
|
145
|
+
option: '--isAdmin [isAdmin]'
|
|
146
|
+
}, {
|
|
147
|
+
option: '--userType [userType]',
|
|
148
|
+
autocomplete: ['member', 'guest']
|
|
149
|
+
}, {
|
|
150
|
+
option: '--userPreferredMethodForSecondaryAuthentication [userPreferredMethodForSecondaryAuthentication ]',
|
|
151
|
+
autocomplete: authenticationMethods
|
|
152
|
+
}, {
|
|
153
|
+
option: '--systemPreferredAuthenticationMethods [systemPreferredAuthenticationMethods ]',
|
|
154
|
+
autocomplete: authenticationMethods
|
|
155
|
+
}, {
|
|
156
|
+
option: '--isSelfServicePasswordResetRegistered [isSelfServicePasswordResetRegistered]'
|
|
157
|
+
}, {
|
|
158
|
+
option: '--isSelfServicePasswordResetEnabled [isSelfServicePasswordResetEnabled]'
|
|
159
|
+
}, {
|
|
160
|
+
option: '--isSelfServicePasswordResetCapable [isSelfServicePasswordResetCapable]'
|
|
161
|
+
}, {
|
|
162
|
+
option: '--isMfaRegistered [isMfaRegistered]'
|
|
163
|
+
}, {
|
|
164
|
+
option: '--isMfaCapable [isMfaCapable]'
|
|
165
|
+
}, {
|
|
166
|
+
option: '--isPasswordlessCapable [isPasswordlessCapable]'
|
|
167
|
+
}, {
|
|
168
|
+
option: '--isSystemPreferredAuthenticationMethodEnabled [isSystemPreferredAuthenticationMethodEnabled]'
|
|
169
|
+
}, {
|
|
170
|
+
option: '--methodsRegistered [methodsRegistered]',
|
|
171
|
+
autocomplete: methodsRegistered
|
|
172
|
+
}, {
|
|
173
|
+
option: '--userIds [userIds]'
|
|
174
|
+
}, {
|
|
175
|
+
option: '--userPrincipalNames [userPrincipalNames]'
|
|
176
|
+
}, {
|
|
177
|
+
option: '-p, --properties [properties]'
|
|
178
|
+
});
|
|
179
|
+
}, _EntraUserRegistrationDetailsListCommand_initValidators = function _EntraUserRegistrationDetailsListCommand_initValidators() {
|
|
180
|
+
this.validators.push(async (args) => {
|
|
181
|
+
if (args.options.userType) {
|
|
182
|
+
if (['member', 'guest'].every(type => type !== args.options.userType)) {
|
|
183
|
+
return `'${args.options.userType}' is not a valid userType value. Allowed values member, guest`;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (args.options.userPreferredMethodForSecondaryAuthentication) {
|
|
187
|
+
const methods = args.options.userPreferredMethodForSecondaryAuthentication.split(',').map(m => m.trim());
|
|
188
|
+
const invalidMethods = methods.filter(m => !authenticationMethods.includes(m));
|
|
189
|
+
if (invalidMethods.length > 0) {
|
|
190
|
+
return `'${args.options.userPreferredMethodForSecondaryAuthentication}' is not a valid userPreferredMethodForSecondaryAuthentication value. Invalid values: ${invalidMethods.join(',')}. Allowed values ${authenticationMethods.join(', ')}`;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (args.options.systemPreferredAuthenticationMethods) {
|
|
194
|
+
const methods = args.options.systemPreferredAuthenticationMethods.split(',').map(m => m.trim());
|
|
195
|
+
const invalidMethods = methods.filter(m => !authenticationMethods.includes(m));
|
|
196
|
+
if (invalidMethods.length > 0) {
|
|
197
|
+
return `'${args.options.systemPreferredAuthenticationMethods}' is not a valid systemPreferredAuthenticationMethods value. Invalid values: ${invalidMethods.join(',')}. Allowed values ${authenticationMethods.join(', ')}`;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (args.options.methodsRegistered) {
|
|
201
|
+
const methods = args.options.methodsRegistered.split(',').map(m => m.trim());
|
|
202
|
+
const invalidMethods = methods.filter(m => !methodsRegistered.includes(m));
|
|
203
|
+
if (invalidMethods.length > 0) {
|
|
204
|
+
return `'${args.options.methodsRegistered}' is not a valid methodsRegistered value. Invalid values: ${invalidMethods.join(',')}. Allowed values ${methodsRegistered.join(', ')}`;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (args.options.userIds) {
|
|
208
|
+
const ids = args.options.userIds.split(',').map(i => i.trim());
|
|
209
|
+
if (!validation.isValidGuidArray(ids)) {
|
|
210
|
+
const invalidGuid = ids.find(id => !validation.isValidGuid(id));
|
|
211
|
+
return `'${invalidGuid}' is not a valid GUID for option 'userIds'.`;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (args.options.userPrincipalNames) {
|
|
215
|
+
const isValidUserPrincipalNameArray = validation.isValidUserPrincipalNameArray(args.options.userPrincipalNames.split(',').map(u => u.trim()));
|
|
216
|
+
if (isValidUserPrincipalNameArray !== true) {
|
|
217
|
+
return `User principal name '${isValidUserPrincipalNameArray}' is invalid for option 'userPrincipalNames'.`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return true;
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
export default new EntraUserRegistrationDetailsListCommand();
|
|
224
|
+
//# sourceMappingURL=user-registrationdetails-list.js.map
|
|
@@ -7,6 +7,7 @@ export default {
|
|
|
7
7
|
ADMINISTRATIVEUNIT_MEMBER_ADD: `${prefix} administrativeunit member add`,
|
|
8
8
|
ADMINISTRATIVEUNIT_MEMBER_GET: `${prefix} administrativeunit member get`,
|
|
9
9
|
ADMINISTRATIVEUNIT_MEMBER_LIST: `${prefix} administrativeunit member list`,
|
|
10
|
+
ADMINISTRATIVEUNIT_MEMBER_REMOVE: `${prefix} administrativeunit member remove`,
|
|
10
11
|
ADMINISTRATIVEUNIT_ROLEASSIGNMENT_ADD: `${prefix} administrativeunit roleassignment add`,
|
|
11
12
|
APP_ADD: `${prefix} app add`,
|
|
12
13
|
APP_GET: `${prefix} app get`,
|
|
@@ -14,12 +15,26 @@ export default {
|
|
|
14
15
|
APP_REMOVE: `${prefix} app remove`,
|
|
15
16
|
APP_SET: `${prefix} app set`,
|
|
16
17
|
APP_PERMISSION_ADD: `${prefix} app permission add`,
|
|
18
|
+
APP_PERMISSION_LIST: `${prefix} app permission list`,
|
|
17
19
|
APP_ROLE_ADD: `${prefix} app role add`,
|
|
18
20
|
APP_ROLE_LIST: `${prefix} app role list`,
|
|
19
21
|
APP_ROLE_REMOVE: `${prefix} app role remove`,
|
|
22
|
+
APPREGISTRATION_ADD: `${prefix} appregistration add`,
|
|
23
|
+
APPREGISTRATION_GET: `${prefix} appregistration get`,
|
|
24
|
+
APPREGISTRATION_LIST: `${prefix} appregistration list`,
|
|
25
|
+
APPREGISTRATION_REMOVE: `${prefix} appregistration remove`,
|
|
26
|
+
APPREGISTRATION_SET: `${prefix} appregistration set`,
|
|
27
|
+
APPREGISTRATION_PERMISSION_ADD: `${prefix} appregistration permission add`,
|
|
28
|
+
APPREGISTRATION_ROLE_ADD: `${prefix} appregistration role add`,
|
|
29
|
+
APPREGISTRATION_ROLE_LIST: `${prefix} appregistration role list`,
|
|
30
|
+
APPREGISTRATION_ROLE_REMOVE: `${prefix} appregistration role remove`,
|
|
20
31
|
APPROLEASSIGNMENT_ADD: `${prefix} approleassignment add`,
|
|
21
32
|
APPROLEASSIGNMENT_LIST: `${prefix} approleassignment list`,
|
|
22
33
|
APPROLEASSIGNMENT_REMOVE: `${prefix} approleassignment remove`,
|
|
34
|
+
ENTERPRISEAPP_ADD: `${prefix} enterpriseapp add`,
|
|
35
|
+
ENTERPRISEAPP_GET: `${prefix} enterpriseapp get`,
|
|
36
|
+
ENTERPRISEAPP_LIST: `${prefix} enterpriseapp list`,
|
|
37
|
+
GROUP_ADD: `${prefix} group add`,
|
|
23
38
|
GROUP_GET: `${prefix} group get`,
|
|
24
39
|
GROUP_LIST: `${prefix} group list`,
|
|
25
40
|
GROUP_REMOVE: `${prefix} group remove`,
|
|
@@ -79,6 +94,7 @@ export default {
|
|
|
79
94
|
USER_RECYCLEBINITEM_CLEAR: `${prefix} user recyclebinitem clear`,
|
|
80
95
|
USER_RECYCLEBINITEM_LIST: `${prefix} user recyclebinitem list`,
|
|
81
96
|
USER_RECYCLEBINITEM_REMOVE: `${prefix} user recyclebinitem remove`,
|
|
97
|
+
USER_REGISTRATIONDETAILS_LIST: `${prefix} user registrationdetails list`,
|
|
82
98
|
USER_REMOVE: `${prefix} user remove`,
|
|
83
99
|
USER_RECYCLEBINITEM_RESTORE: `${prefix} user recyclebinitem restore`,
|
|
84
100
|
USER_SET: `${prefix} user set`,
|
|
@@ -0,0 +1,151 @@
|
|
|
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 _FileCopyCommand_instances, _FileCopyCommand_initTelemetry, _FileCopyCommand_initOptions, _FileCopyCommand_initValidators;
|
|
7
|
+
import request from '../../../request.js';
|
|
8
|
+
import { urlUtil } from '../../../utils/urlUtil.js';
|
|
9
|
+
import { spo } from '../../../utils/spo.js';
|
|
10
|
+
import { validation } from '../../../utils/validation.js';
|
|
11
|
+
import GraphCommand from '../../base/GraphCommand.js';
|
|
12
|
+
import commands from '../commands.js';
|
|
13
|
+
class FileCopyCommand extends GraphCommand {
|
|
14
|
+
get name() {
|
|
15
|
+
return commands.COPY;
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return 'Copies a file to another location using the Microsoft Graph';
|
|
19
|
+
}
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
_FileCopyCommand_instances.add(this);
|
|
23
|
+
this.nameConflictBehaviorOptions = ['fail', 'replace', 'rename'];
|
|
24
|
+
__classPrivateFieldGet(this, _FileCopyCommand_instances, "m", _FileCopyCommand_initTelemetry).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _FileCopyCommand_instances, "m", _FileCopyCommand_initOptions).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _FileCopyCommand_instances, "m", _FileCopyCommand_initValidators).call(this);
|
|
27
|
+
}
|
|
28
|
+
async commandAction(logger, args) {
|
|
29
|
+
try {
|
|
30
|
+
const { webUrl, sourceUrl, targetUrl, newName, verbose } = args.options;
|
|
31
|
+
const sourcePath = this.getAbsoluteUrl(webUrl, sourceUrl);
|
|
32
|
+
const destinationPath = this.getAbsoluteUrl(webUrl, targetUrl);
|
|
33
|
+
if (this.verbose) {
|
|
34
|
+
logger.logToStderr(`Copying file '${sourcePath}' to '${destinationPath}'...`);
|
|
35
|
+
}
|
|
36
|
+
const copyUrl = await this.getCopyUrl(args.options, sourcePath, logger);
|
|
37
|
+
const { targetDriveId, targetItemId } = await this.getTargetDriveAndItemId(webUrl, targetUrl, logger, verbose);
|
|
38
|
+
const requestOptions = {
|
|
39
|
+
url: copyUrl,
|
|
40
|
+
headers: {
|
|
41
|
+
accept: 'application/json;odata.metadata=none'
|
|
42
|
+
},
|
|
43
|
+
responseType: 'json',
|
|
44
|
+
data: {
|
|
45
|
+
parentReference: {
|
|
46
|
+
driveId: targetDriveId,
|
|
47
|
+
id: targetItemId
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
if (newName) {
|
|
52
|
+
const sourceFileName = sourcePath.substring(sourcePath.lastIndexOf('/') + 1);
|
|
53
|
+
const sourceFileExtension = sourceFileName.includes('.') ? sourceFileName.substring(sourceFileName.lastIndexOf('.')) : '';
|
|
54
|
+
const newNameExtension = newName.includes('.') ? newName.substring(newName.lastIndexOf('.')) : '';
|
|
55
|
+
requestOptions.data.name = newNameExtension ? `${newName.replace(newNameExtension, "")}${sourceFileExtension}` : `${newName}${sourceFileExtension}`;
|
|
56
|
+
}
|
|
57
|
+
await request.post(requestOptions);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
this.handleRejectedODataJsonPromise(err);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async getCopyUrl(options, sourcePath, logger) {
|
|
64
|
+
const { webUrl, sourceUrl, verbose, nameConflictBehavior } = options;
|
|
65
|
+
const folderUrl = new URL(sourcePath);
|
|
66
|
+
const siteId = await spo.getSiteId(webUrl, logger, verbose);
|
|
67
|
+
const drive = await this.getDocumentLibrary(siteId, folderUrl, sourceUrl, logger);
|
|
68
|
+
const itemId = await this.getStartingFolderId(drive, folderUrl, logger);
|
|
69
|
+
const queryParameters = nameConflictBehavior && nameConflictBehavior !== 'fail'
|
|
70
|
+
? `@microsoft.graph.conflictBehavior=${nameConflictBehavior}`
|
|
71
|
+
: '';
|
|
72
|
+
const copyUrl = `${this.resource}/v1.0/sites/${siteId}/drives/${drive.id}/items/${itemId}/copy${queryParameters ? `?${queryParameters}` : ''}`;
|
|
73
|
+
return copyUrl;
|
|
74
|
+
}
|
|
75
|
+
async getTargetDriveAndItemId(webUrl, targetUrl, logger, verbose) {
|
|
76
|
+
const targetSiteUrl = urlUtil.getTargetSiteAbsoluteUrl(webUrl, targetUrl);
|
|
77
|
+
const targetSiteId = await spo.getSiteId(targetSiteUrl, logger, verbose);
|
|
78
|
+
const targetFolderUrl = new URL(this.getAbsoluteUrl(targetSiteUrl, targetUrl));
|
|
79
|
+
const targetDrive = await this.getDocumentLibrary(targetSiteId, targetFolderUrl, targetUrl, logger);
|
|
80
|
+
const targetDriveId = targetDrive.id;
|
|
81
|
+
const targetItemId = await this.getStartingFolderId(targetDrive, targetFolderUrl, logger);
|
|
82
|
+
return { targetDriveId, targetItemId };
|
|
83
|
+
}
|
|
84
|
+
async getDocumentLibrary(siteId, folderUrl, folderUrlFromUser, logger) {
|
|
85
|
+
if (this.verbose) {
|
|
86
|
+
logger.logToStderr(`Getting document library...`);
|
|
87
|
+
}
|
|
88
|
+
const requestOptions = {
|
|
89
|
+
url: `${this.resource}/v1.0/sites/${siteId}/drives?$select=webUrl,id`,
|
|
90
|
+
headers: {
|
|
91
|
+
accept: 'application/json;odata.metadata=none'
|
|
92
|
+
},
|
|
93
|
+
responseType: 'json'
|
|
94
|
+
};
|
|
95
|
+
const drives = await request.get(requestOptions);
|
|
96
|
+
const lowerCaseFolderUrl = folderUrl.href.toLowerCase();
|
|
97
|
+
const drive = drives.value
|
|
98
|
+
.sort((a, b) => b.webUrl.localeCompare(a.webUrl))
|
|
99
|
+
.find((d) => {
|
|
100
|
+
const driveUrl = d.webUrl.toLowerCase();
|
|
101
|
+
// ensure that the drive url is a prefix of the folder url
|
|
102
|
+
return lowerCaseFolderUrl.startsWith(driveUrl) &&
|
|
103
|
+
(driveUrl.length === lowerCaseFolderUrl.length ||
|
|
104
|
+
lowerCaseFolderUrl[driveUrl.length] === '/');
|
|
105
|
+
});
|
|
106
|
+
if (!drive) {
|
|
107
|
+
throw `Document library '${folderUrlFromUser}' not found`;
|
|
108
|
+
}
|
|
109
|
+
return drive;
|
|
110
|
+
}
|
|
111
|
+
async getStartingFolderId(documentLibrary, folderUrl, logger) {
|
|
112
|
+
if (this.verbose) {
|
|
113
|
+
logger.logToStderr(`Getting starting folder id...`);
|
|
114
|
+
}
|
|
115
|
+
const documentLibraryRelativeFolderUrl = folderUrl.href.replace(new RegExp(`${documentLibrary.webUrl}`, 'i'), '').replace(/\/+$/, '');
|
|
116
|
+
const requestOptions = {
|
|
117
|
+
url: `${this.resource}/v1.0/drives/${documentLibrary.id}/root${documentLibraryRelativeFolderUrl ? `:${documentLibraryRelativeFolderUrl}` : ''}?$select=id`,
|
|
118
|
+
headers: {
|
|
119
|
+
accept: 'application/json;odata.metadata=none'
|
|
120
|
+
},
|
|
121
|
+
responseType: 'json'
|
|
122
|
+
};
|
|
123
|
+
const folder = await request.get(requestOptions);
|
|
124
|
+
return folder?.id;
|
|
125
|
+
}
|
|
126
|
+
getAbsoluteUrl(webUrl, url) {
|
|
127
|
+
return url.startsWith('https://') ? url : urlUtil.getAbsoluteUrl(webUrl, url);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
_FileCopyCommand_instances = new WeakSet(), _FileCopyCommand_initTelemetry = function _FileCopyCommand_initTelemetry() {
|
|
131
|
+
this.telemetry.push((args) => {
|
|
132
|
+
Object.assign(this.telemetryProperties, {
|
|
133
|
+
webUrl: typeof args.options.webUrl !== 'undefined',
|
|
134
|
+
sourceUrl: typeof args.options.sourceUrl !== 'undefined',
|
|
135
|
+
targetUrl: typeof args.options.targetUrl !== 'undefined',
|
|
136
|
+
newName: typeof args.options.newName !== 'undefined',
|
|
137
|
+
nameConflictBehavior: typeof args.options.nameConflictBehavior !== 'undefined'
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}, _FileCopyCommand_initOptions = function _FileCopyCommand_initOptions() {
|
|
141
|
+
this.options.unshift({ option: '-u, --webUrl <webUrl>' }, { option: '-s, --sourceUrl <sourceUrl>' }, { option: '-t, --targetUrl <targetUrl>' }, { option: '--newName [newName]' }, { option: '--nameConflictBehavior [nameConflictBehavior]', autocomplete: this.nameConflictBehaviorOptions });
|
|
142
|
+
}, _FileCopyCommand_initValidators = function _FileCopyCommand_initValidators() {
|
|
143
|
+
this.validators.push(async (args) => {
|
|
144
|
+
if (args.options.nameConflictBehavior && this.nameConflictBehaviorOptions.indexOf(args.options.nameConflictBehavior) === -1) {
|
|
145
|
+
return `${args.options.nameConflictBehavior} is not a valid nameConflictBehavior value. Allowed values: ${this.nameConflictBehaviorOptions.join(', ')}.`;
|
|
146
|
+
}
|
|
147
|
+
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
export default new FileCopyCommand();
|
|
151
|
+
//# sourceMappingURL=file-copy.js.map
|
|
@@ -13,11 +13,11 @@ export const workflow = {
|
|
|
13
13
|
steps: [
|
|
14
14
|
{
|
|
15
15
|
name: "Checkout",
|
|
16
|
-
uses: "actions/checkout@
|
|
16
|
+
uses: "actions/checkout@v4"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
name: "Use Node.js",
|
|
20
|
-
uses: "actions/setup-node@
|
|
20
|
+
uses: "actions/setup-node@v4",
|
|
21
21
|
with: {
|
|
22
22
|
"node-version": "18.x"
|
|
23
23
|
}
|
|
@@ -36,7 +36,8 @@ export const workflow = {
|
|
|
36
36
|
with: {
|
|
37
37
|
"CERTIFICATE_ENCODED": "${{ secrets.CERTIFICATE_ENCODED }}",
|
|
38
38
|
"CERTIFICATE_PASSWORD": "${{ secrets.CERTIFICATE_PASSWORD }}",
|
|
39
|
-
"APP_ID": "${{ secrets.APP_ID }}"
|
|
39
|
+
"APP_ID": "${{ secrets.APP_ID }}",
|
|
40
|
+
"TENANT": "${{ secrets.TENANT_ID }}"
|
|
40
41
|
}
|
|
41
42
|
},
|
|
42
43
|
{
|
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
|