@pnp/cli-microsoft365 11.0.0-beta.1f852eb → 11.0.0-beta.3d99ea3
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 +2 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/entra/commands/app/app-add.js +14 -2
- package/dist/m365/outlook/commands/mail/mail-searchfolder-add.js +85 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/pp/commands.js +0 -4
- package/dist/m365/spo/commands/customaction/customaction-list.js +3 -10
- package/dist/m365/spo/commands/homesite/homesite-set.js +88 -44
- package/dist/m365/spo/commands.js +0 -1
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +5 -12
- package/dist/m365/teams/commands/report/report-pstncalls.js +5 -12
- package/dist/m365/viva/commands.js +0 -3
- package/dist/utils/entraApp.js +15 -0
- package/docs/docs/cmd/entra/app/app-add.mdx +7 -1
- package/docs/docs/cmd/outlook/mail/mail-searchfolder-add.mdx +147 -0
- package/docs/docs/cmd/spo/homesite/homesite-set.mdx +85 -45
- package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +25 -44
- package/docs/docs/cmd/teams/report/report-pstncalls.mdx +25 -48
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-user-add.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-user-remove.mdx +19 -0
- package/npm-shrinkwrap.json +51 -51
- package/package.json +12 -12
- package/dist/m365/pp/commands/card/card-clone.js +0 -101
- package/dist/m365/pp/commands/card/card-get.js +0 -89
- package/dist/m365/pp/commands/card/card-list.js +0 -55
- package/dist/m365/pp/commands/card/card-remove.js +0 -105
- package/dist/m365/skype/commands/report/report-activitycounts.js +0 -15
- package/dist/m365/skype/commands/report/report-activityusercounts.js +0 -15
- package/dist/m365/skype/commands/report/report-activityuserdetail.js +0 -15
- package/dist/m365/skype/commands.js +0 -7
- package/dist/m365/spo/commands/mail/mail-send.js +0 -108
- package/dist/m365/viva/commands/engage/engage-group-list.js +0 -93
- package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -73
- package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -88
- package/docs/docs/cmd/pp/card/card-clone.mdx +0 -103
- package/docs/docs/cmd/pp/card/card-get.mdx +0 -212
- package/docs/docs/cmd/pp/card/card-list.mdx +0 -163
- package/docs/docs/cmd/pp/card/card-remove.mdx +0 -86
- package/docs/docs/cmd/skype/report/report-activitycounts.mdx +0 -96
- package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +0 -96
- package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +0 -134
- package/docs/docs/cmd/spo/mail/mail-send.mdx +0 -69
- package/docs/docs/cmd/viva/engage/engage-group-list.mdx +0 -174
- package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +0 -60
- package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +0 -58
|
@@ -425,7 +425,9 @@ _a = EntraAppAddCommand, _EntraAppAddCommand_instances = new WeakSet(), _EntraAp
|
|
|
425
425
|
certificateBase64Encoded: typeof args.options.certificateBase64Encoded !== 'undefined',
|
|
426
426
|
certificateDisplayName: typeof args.options.certificateDisplayName !== 'undefined',
|
|
427
427
|
grantAdminConsent: typeof args.options.grantAdminConsent !== 'undefined',
|
|
428
|
-
allowPublicClientFlows: typeof args.options.allowPublicClientFlows !== 'undefined'
|
|
428
|
+
allowPublicClientFlows: typeof args.options.allowPublicClientFlows !== 'undefined',
|
|
429
|
+
bundleId: typeof args.options.bundleId !== 'undefined',
|
|
430
|
+
signatureHash: typeof args.options.signatureHash !== 'undefined'
|
|
429
431
|
});
|
|
430
432
|
});
|
|
431
433
|
}, _EntraAppAddCommand_initOptions = function _EntraAppAddCommand_initOptions() {
|
|
@@ -465,6 +467,10 @@ _a = EntraAppAddCommand, _EntraAppAddCommand_instances = new WeakSet(), _EntraAp
|
|
|
465
467
|
option: '--certificateDisplayName [certificateDisplayName]'
|
|
466
468
|
}, {
|
|
467
469
|
option: '--manifest [manifest]'
|
|
470
|
+
}, {
|
|
471
|
+
option: '--bundleId [bundleId]'
|
|
472
|
+
}, {
|
|
473
|
+
option: '--signatureHash [signatureHash]'
|
|
468
474
|
}, {
|
|
469
475
|
option: '--save'
|
|
470
476
|
}, {
|
|
@@ -519,12 +525,18 @@ _a = EntraAppAddCommand, _EntraAppAddCommand_instances = new WeakSet(), _EntraAp
|
|
|
519
525
|
return `Error while parsing the specified manifest: ${e}`;
|
|
520
526
|
}
|
|
521
527
|
}
|
|
528
|
+
if (args.options.platform === 'apple' && !args.options.bundleId) {
|
|
529
|
+
return `When you use platform apple, you'll need to specify bundleId`;
|
|
530
|
+
}
|
|
531
|
+
if (args.options.platform === 'android' && (!args.options.bundleId || !args.options.signatureHash)) {
|
|
532
|
+
return `When you use platform android, you'll need to specify bundleId and signatureHash`;
|
|
533
|
+
}
|
|
522
534
|
return true;
|
|
523
535
|
});
|
|
524
536
|
}, _EntraAppAddCommand_initOptionSets = function _EntraAppAddCommand_initOptionSets() {
|
|
525
537
|
this.optionSets.push({ options: ['name', 'manifest'] });
|
|
526
538
|
};
|
|
527
|
-
EntraAppAddCommand.entraApplicationPlatform = ['spa', 'web', 'publicClient'];
|
|
539
|
+
EntraAppAddCommand.entraApplicationPlatform = ['spa', 'web', 'publicClient', 'apple', 'android'];
|
|
528
540
|
EntraAppAddCommand.entraAppScopeConsentBy = ['admins', 'adminsAndUsers'];
|
|
529
541
|
export default new EntraAppAddCommand();
|
|
530
542
|
//# sourceMappingURL=app-add.js.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import request from '../../../../request.js';
|
|
2
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
|
+
import commands from '../../commands.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
6
|
+
import { zod } from '../../../../utils/zod.js';
|
|
7
|
+
import { validation } from '../../../../utils/validation.js';
|
|
8
|
+
import { accessToken } from '../../../../utils/accessToken.js';
|
|
9
|
+
import auth from '../../../../Auth.js';
|
|
10
|
+
const options = globalOptionsZod
|
|
11
|
+
.extend({
|
|
12
|
+
userId: zod.alias('i', z.string()
|
|
13
|
+
.refine(userId => validation.isValidGuid(userId), userId => ({
|
|
14
|
+
message: `'${userId}' is not a valid GUID.`
|
|
15
|
+
})).optional()),
|
|
16
|
+
userName: zod.alias('n', z.string()
|
|
17
|
+
.refine(userName => validation.isValidUserPrincipalName(userName), userName => ({
|
|
18
|
+
message: `'${userName}' is not a valid UPN.`
|
|
19
|
+
})).optional()),
|
|
20
|
+
folderName: z.string(),
|
|
21
|
+
messageFilter: z.string(),
|
|
22
|
+
sourceFoldersIds: z.string().transform((value) => value.split(',')).pipe(z.string().array()),
|
|
23
|
+
includeNestedFolders: z.boolean().optional()
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
26
|
+
class OutlookMailSearchFolderAddCommand extends GraphCommand {
|
|
27
|
+
get name() {
|
|
28
|
+
return commands.MAIL_SEARCHFOLDER_ADD;
|
|
29
|
+
}
|
|
30
|
+
get description() {
|
|
31
|
+
return `Creates a new mail search folder in the user's mailbox`;
|
|
32
|
+
}
|
|
33
|
+
get schema() {
|
|
34
|
+
return options;
|
|
35
|
+
}
|
|
36
|
+
getRefinedSchema(schema) {
|
|
37
|
+
return schema
|
|
38
|
+
.refine(options => !(options.userId && options.userName), {
|
|
39
|
+
message: 'Specify either userId or userName, but not both'
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async commandAction(logger, args) {
|
|
43
|
+
try {
|
|
44
|
+
const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(auth.connection.accessTokens[auth.defaultResource].accessToken);
|
|
45
|
+
let requestUrl = `${this.resource}/v1.0/me/mailFolders/searchFolders/childFolders`;
|
|
46
|
+
if (isAppOnlyAccessToken) {
|
|
47
|
+
if (!args.options.userId && !args.options.userName) {
|
|
48
|
+
throw 'When running with application permissions either userId or userName is required';
|
|
49
|
+
}
|
|
50
|
+
const userIdentifier = args.options.userId ?? args.options.userName;
|
|
51
|
+
requestUrl = `${this.resource}/v1.0/users('${userIdentifier}')/mailFolders/searchFolders/childFolders`;
|
|
52
|
+
if (args.options.verbose) {
|
|
53
|
+
await logger.logToStderr(`Creating a mail search folder in the mailbox of the user ${userIdentifier}...`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
if (args.options.userId || args.options.userName) {
|
|
58
|
+
throw 'You can create mail search folder for other users only if CLI is authenticated in app-only mode';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const requestOptions = {
|
|
62
|
+
url: requestUrl,
|
|
63
|
+
headers: {
|
|
64
|
+
accept: 'application/json;odata.metadata=none',
|
|
65
|
+
'content-type': 'application/json'
|
|
66
|
+
},
|
|
67
|
+
responseType: 'json',
|
|
68
|
+
data: {
|
|
69
|
+
'@odata.type': '#microsoft.graph.mailSearchFolder',
|
|
70
|
+
displayName: args.options.folderName,
|
|
71
|
+
includeNestedFolders: args.options.includeNestedFolders,
|
|
72
|
+
filterQuery: args.options.messageFilter,
|
|
73
|
+
sourceFolderIds: args.options.sourceFoldersIds
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const result = await request.post(requestOptions);
|
|
77
|
+
await logger.log(result);
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
this.handleRejectedODataJsonPromise(err);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export default new OutlookMailSearchFolderAddCommand();
|
|
85
|
+
//# sourceMappingURL=mail-searchfolder-add.js.map
|
package/dist/m365/pp/commands.js
CHANGED
|
@@ -3,10 +3,6 @@ export default {
|
|
|
3
3
|
AIBUILDERMODEL_GET: `${prefix} aibuildermodel get`,
|
|
4
4
|
AIBUILDERMODEL_LIST: `${prefix} aibuildermodel list`,
|
|
5
5
|
AIBUILDERMODEL_REMOVE: `${prefix} aibuildermodel remove`,
|
|
6
|
-
CARD_CLONE: `${prefix} card clone`,
|
|
7
|
-
CARD_GET: `${prefix} card get`,
|
|
8
|
-
CARD_LIST: `${prefix} card list`,
|
|
9
|
-
CARD_REMOVE: `${prefix} card remove`,
|
|
10
6
|
CHATBOT_GET: `${prefix} chatbot get`,
|
|
11
7
|
CHATBOT_LIST: `${prefix} chatbot list`,
|
|
12
8
|
CHATBOT_REMOVE: `${prefix} chatbot remove`,
|
|
@@ -33,17 +33,10 @@ class SpoCustomActionListCommand extends SpoCommand {
|
|
|
33
33
|
await logger.logToStderr('');
|
|
34
34
|
}
|
|
35
35
|
const customActions = await spo.getCustomActions(args.options.webUrl, args.options.scope);
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
await logger.logToStderr(`Custom actions not found`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
if (args.options.output !== 'json') {
|
|
43
|
-
customActions.forEach(a => a.Scope = this.humanizeScope(a.Scope));
|
|
44
|
-
}
|
|
45
|
-
await logger.log(customActions);
|
|
36
|
+
if (args.options.output !== 'json') {
|
|
37
|
+
customActions.forEach(a => a.Scope = this.humanizeScope(a.Scope));
|
|
46
38
|
}
|
|
39
|
+
await logger.log(customActions);
|
|
47
40
|
}
|
|
48
41
|
catch (err) {
|
|
49
42
|
this.handleRejectedPromise(err);
|
|
@@ -1,79 +1,123 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoHomeSiteSetCommand_instances, _SpoHomeSiteSetCommand_initTelemetry, _SpoHomeSiteSetCommand_initOptions, _SpoHomeSiteSetCommand_initValidators, _SpoHomeSiteSetCommand_initTypes;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { zod } from '../../../../utils/zod.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
4
|
import request from '../../../../request.js';
|
|
8
5
|
import { spo } from '../../../../utils/spo.js';
|
|
9
6
|
import { validation } from '../../../../utils/validation.js';
|
|
10
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
8
|
import commands from '../../commands.js';
|
|
9
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
|
+
const optionsSchema = globalOptionsZod
|
|
11
|
+
.extend({
|
|
12
|
+
url: zod.alias('u', z.string()
|
|
13
|
+
.refine((url) => validation.isValidSharePointUrl(url) === true, url => ({
|
|
14
|
+
message: `'${url}' is not a valid SharePoint Online site URL.`
|
|
15
|
+
}))),
|
|
16
|
+
vivaConnectionsDefaultStart: z.boolean().optional(),
|
|
17
|
+
draftMode: z.boolean().optional(),
|
|
18
|
+
audienceIds: z.string()
|
|
19
|
+
.refine(audiences => validation.isValidGuidArray(audiences) === true, audiences => ({
|
|
20
|
+
message: `The following GUIDs are invalid: ${validation.isValidGuidArray(audiences)}.`
|
|
21
|
+
})).optional(),
|
|
22
|
+
audienceNames: z.string().optional(),
|
|
23
|
+
targetedLicenseType: z.enum(['everyone', 'frontLineWorkers', 'informationWorkers']).optional(),
|
|
24
|
+
order: z.number()
|
|
25
|
+
.refine(order => validation.isValidPositiveInteger(order) === true, order => ({
|
|
26
|
+
message: `'${order}' is not a positive integer.`
|
|
27
|
+
})).optional()
|
|
28
|
+
});
|
|
12
29
|
class SpoHomeSiteSetCommand extends SpoCommand {
|
|
13
30
|
get name() {
|
|
14
31
|
return commands.HOMESITE_SET;
|
|
15
32
|
}
|
|
16
33
|
get description() {
|
|
17
|
-
return '
|
|
34
|
+
return 'Updates an existing SharePoint home site.';
|
|
18
35
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
36
|
+
get schema() {
|
|
37
|
+
return optionsSchema;
|
|
38
|
+
}
|
|
39
|
+
getRefinedSchema(schema) {
|
|
40
|
+
return schema
|
|
41
|
+
.refine((options) => [options.audienceIds, options.audienceNames].filter(o => o !== undefined).length <= 1, {
|
|
42
|
+
message: 'You must specify either audienceIds or audienceNames but not both.'
|
|
43
|
+
})
|
|
44
|
+
.refine((options) => options.vivaConnectionsDefaultStart !== undefined ||
|
|
45
|
+
options.draftMode !== undefined ||
|
|
46
|
+
options.audienceIds !== undefined ||
|
|
47
|
+
options.audienceNames !== undefined ||
|
|
48
|
+
options.targetedLicenseType !== undefined ||
|
|
49
|
+
options.order !== undefined, {
|
|
50
|
+
message: 'You must specify at least one option to configure.'
|
|
51
|
+
});
|
|
26
52
|
}
|
|
27
53
|
async commandAction(logger, args) {
|
|
28
54
|
try {
|
|
29
55
|
if (this.verbose) {
|
|
30
|
-
await logger.logToStderr(`
|
|
31
|
-
await logger.logToStderr(
|
|
56
|
+
await logger.logToStderr(`Configuring SharePoint home site: ${args.options.url}...`);
|
|
57
|
+
await logger.logToStderr(`Attempting to retrieve the SharePoint admin URL.`);
|
|
32
58
|
}
|
|
33
59
|
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
60
|
+
const configuration = {};
|
|
61
|
+
if (args.options.vivaConnectionsDefaultStart !== undefined) {
|
|
62
|
+
configuration.IsVivaConnectionsDefaultStartPresent = true;
|
|
63
|
+
configuration.vivaConnectionsDefaultStart = args.options.vivaConnectionsDefaultStart;
|
|
64
|
+
}
|
|
65
|
+
if (args.options.draftMode !== undefined) {
|
|
66
|
+
configuration.IsInDraftModePresent = true;
|
|
67
|
+
configuration.isInDraftMode = args.options.draftMode;
|
|
68
|
+
}
|
|
69
|
+
if (args.options.audienceIds !== undefined) {
|
|
70
|
+
configuration.IsAudiencesPresent = true;
|
|
71
|
+
configuration.Audiences = args.options.audienceIds.split(',').map(id => id.trim());
|
|
72
|
+
}
|
|
73
|
+
if (args.options.audienceNames !== undefined) {
|
|
74
|
+
configuration.IsAudiencesPresent = true;
|
|
75
|
+
configuration.Audiences = args.options.audienceNames.trim() === '' ? [] : await this.transformAudienceNamesToIds(args.options.audienceNames);
|
|
76
|
+
}
|
|
77
|
+
if (args.options.targetedLicenseType !== undefined) {
|
|
78
|
+
configuration.IsTargetedLicenseTypePresent = true;
|
|
79
|
+
configuration.TargetedLicenseType = this.convertTargetedLicenseTypeToNumber(args.options.targetedLicenseType);
|
|
80
|
+
}
|
|
81
|
+
if (args.options.order !== undefined) {
|
|
82
|
+
configuration.IsOrderPresent = true;
|
|
83
|
+
configuration.Order = args.options.order;
|
|
84
|
+
}
|
|
34
85
|
const requestOptions = {
|
|
35
|
-
url: `${spoAdminUrl}/_api/SPO.Tenant`,
|
|
86
|
+
url: `${spoAdminUrl}/_api/SPO.Tenant/UpdateTargetedSite`,
|
|
36
87
|
headers: {
|
|
37
88
|
accept: 'application/json;odata=nometadata',
|
|
38
89
|
'content-Type': 'application/json'
|
|
39
90
|
},
|
|
40
91
|
responseType: 'json',
|
|
41
92
|
data: {
|
|
42
|
-
|
|
93
|
+
siteUrl: args.options.url,
|
|
94
|
+
configurationParam: configuration
|
|
43
95
|
}
|
|
44
96
|
};
|
|
45
|
-
if (args.options.vivaConnectionsDefaultStart !== undefined) {
|
|
46
|
-
requestOptions.url += '/SetSPHSiteWithConfiguration';
|
|
47
|
-
requestOptions.data.configuration = { vivaConnectionsDefaultStart: args.options.vivaConnectionsDefaultStart };
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
requestOptions.url += '/SetSPHSite';
|
|
51
|
-
}
|
|
52
97
|
const res = await request.post(requestOptions);
|
|
53
|
-
await logger.log(res
|
|
98
|
+
await logger.log(res);
|
|
54
99
|
}
|
|
55
100
|
catch (err) {
|
|
56
101
|
this.handleRejectedODataJsonPromise(err);
|
|
57
102
|
}
|
|
58
103
|
}
|
|
104
|
+
convertTargetedLicenseTypeToNumber(licenseType) {
|
|
105
|
+
const licenseTypeMap = {
|
|
106
|
+
'everyone': 0,
|
|
107
|
+
'frontLineWorkers': 1,
|
|
108
|
+
'informationWorkers': 2
|
|
109
|
+
};
|
|
110
|
+
return licenseTypeMap[licenseType];
|
|
111
|
+
}
|
|
112
|
+
async transformAudienceNamesToIds(audienceNames) {
|
|
113
|
+
const names = audienceNames.split(',');
|
|
114
|
+
const ids = [];
|
|
115
|
+
for (const name of names) {
|
|
116
|
+
const id = await entraGroup.getGroupIdByDisplayName(name.trim());
|
|
117
|
+
ids.push(id);
|
|
118
|
+
}
|
|
119
|
+
return ids;
|
|
120
|
+
}
|
|
59
121
|
}
|
|
60
|
-
_SpoHomeSiteSetCommand_instances = new WeakSet(), _SpoHomeSiteSetCommand_initTelemetry = function _SpoHomeSiteSetCommand_initTelemetry() {
|
|
61
|
-
this.telemetry.push((args) => {
|
|
62
|
-
Object.assign(this.telemetryProperties, {
|
|
63
|
-
vivaConnectionsDefaultStart: typeof args.options.vivaConnectionsDefaultStart !== 'undefined'
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}, _SpoHomeSiteSetCommand_initOptions = function _SpoHomeSiteSetCommand_initOptions() {
|
|
67
|
-
this.options.unshift({
|
|
68
|
-
option: '-u, --siteUrl <siteUrl>'
|
|
69
|
-
}, {
|
|
70
|
-
option: '--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart]',
|
|
71
|
-
autocomplete: ['true', 'false']
|
|
72
|
-
});
|
|
73
|
-
}, _SpoHomeSiteSetCommand_initValidators = function _SpoHomeSiteSetCommand_initValidators() {
|
|
74
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.siteUrl));
|
|
75
|
-
}, _SpoHomeSiteSetCommand_initTypes = function _SpoHomeSiteSetCommand_initTypes() {
|
|
76
|
-
this.types.boolean.push('vivaConnectionsDefaultStart');
|
|
77
|
-
};
|
|
78
122
|
export default new SpoHomeSiteSetCommand();
|
|
79
123
|
//# sourceMappingURL=homesite-set.js.map
|
|
@@ -193,7 +193,6 @@ export default {
|
|
|
193
193
|
LISTITEM_ROLEINHERITANCE_BREAK: `${prefix} listitem roleinheritance break`,
|
|
194
194
|
LISTITEM_ROLEINHERITANCE_RESET: `${prefix} listitem roleinheritance reset`,
|
|
195
195
|
LISTITEM_SET: `${prefix} listitem set`,
|
|
196
|
-
MAIL_SEND: `${prefix} mail send`,
|
|
197
196
|
NAVIGATION_NODE_ADD: `${prefix} navigation node add`,
|
|
198
197
|
NAVIGATION_NODE_GET: `${prefix} navigation node get`,
|
|
199
198
|
NAVIGATION_NODE_LIST: `${prefix} navigation node list`,
|
|
@@ -4,12 +4,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _TeamsReportDirectroutingcallsCommand_instances, _TeamsReportDirectroutingcallsCommand_initTelemetry, _TeamsReportDirectroutingcallsCommand_initOptions, _TeamsReportDirectroutingcallsCommand_initValidators;
|
|
7
|
-
import request from '../../../../request.js';
|
|
8
7
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
|
+
import { odata } from '../../../../utils/odata.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
|
-
import
|
|
10
|
+
import GraphApplicationCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
|
-
class TeamsReportDirectroutingcallsCommand extends
|
|
12
|
+
class TeamsReportDirectroutingcallsCommand extends GraphApplicationCommand {
|
|
13
13
|
get allowedOutputs() {
|
|
14
14
|
return ['json', 'csv'];
|
|
15
15
|
}
|
|
@@ -31,16 +31,9 @@ class TeamsReportDirectroutingcallsCommand extends GraphCommand {
|
|
|
31
31
|
}
|
|
32
32
|
async commandAction(logger, args) {
|
|
33
33
|
const toDateTimeParameter = formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
|
|
34
|
-
const requestOptions = {
|
|
35
|
-
url: `${this.resource}/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=${formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
|
|
36
|
-
headers: {
|
|
37
|
-
accept: 'application/json;odata.metadata=none'
|
|
38
|
-
},
|
|
39
|
-
responseType: 'json'
|
|
40
|
-
};
|
|
41
34
|
try {
|
|
42
|
-
const
|
|
43
|
-
await logger.log(
|
|
35
|
+
const response = await odata.getAllItems(`${this.resource}/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=${formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`);
|
|
36
|
+
await logger.log(response);
|
|
44
37
|
}
|
|
45
38
|
catch (err) {
|
|
46
39
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -4,12 +4,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _TeamsReportPstncallsCommand_instances, _TeamsReportPstncallsCommand_initTelemetry, _TeamsReportPstncallsCommand_initOptions, _TeamsReportPstncallsCommand_initValidators;
|
|
7
|
-
import request from '../../../../request.js';
|
|
8
7
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
|
+
import { odata } from '../../../../utils/odata.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
|
-
import
|
|
10
|
+
import GraphApplicationCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
|
-
class TeamsReportPstncallsCommand extends
|
|
12
|
+
class TeamsReportPstncallsCommand extends GraphApplicationCommand {
|
|
13
13
|
get allowedOutputs() {
|
|
14
14
|
return ['json', 'csv'];
|
|
15
15
|
}
|
|
@@ -31,16 +31,9 @@ class TeamsReportPstncallsCommand extends GraphCommand {
|
|
|
31
31
|
}
|
|
32
32
|
async commandAction(logger, args) {
|
|
33
33
|
const toDateTimeParameter = formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
|
|
34
|
-
const requestOptions = {
|
|
35
|
-
url: `${this.resource}/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
|
|
36
|
-
headers: {
|
|
37
|
-
accept: 'application/json;odata.metadata=none'
|
|
38
|
-
},
|
|
39
|
-
responseType: 'json'
|
|
40
|
-
};
|
|
41
34
|
try {
|
|
42
|
-
const
|
|
43
|
-
await logger.log(
|
|
35
|
+
const response = await odata.getAllItems(`${this.resource}/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`);
|
|
36
|
+
await logger.log(response);
|
|
44
37
|
}
|
|
45
38
|
catch (err) {
|
|
46
39
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -9,9 +9,6 @@ export default {
|
|
|
9
9
|
ENGAGE_COMMUNITY_USER_ADD: `${prefix} engage community user add`,
|
|
10
10
|
ENGAGE_COMMUNITY_USER_LIST: `${prefix} engage community user list`,
|
|
11
11
|
ENGAGE_COMMUNITY_USER_REMOVE: `${prefix} engage community user remove`,
|
|
12
|
-
ENGAGE_GROUP_LIST: `${prefix} engage group list`,
|
|
13
|
-
ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
|
|
14
|
-
ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
|
|
15
12
|
ENGAGE_MESSAGE_ADD: `${prefix} engage message add`,
|
|
16
13
|
ENGAGE_MESSAGE_GET: `${prefix} engage message get`,
|
|
17
14
|
ENGAGE_MESSAGE_LIKE_SET: `${prefix} engage message like set`,
|
package/dist/utils/entraApp.js
CHANGED
|
@@ -143,6 +143,21 @@ export const entraApp = {
|
|
|
143
143
|
redirectUris: options.redirectUris.split(',').map(u => u.trim())
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
+
if (options.platform === 'android') {
|
|
147
|
+
applicationInfo['publicClient'] = {
|
|
148
|
+
redirectUris: [
|
|
149
|
+
`msauth://${options.bundleId}/${formatting.encodeQueryParameter(options.signatureHash)}`
|
|
150
|
+
]
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
if (options.platform === 'apple') {
|
|
154
|
+
applicationInfo['publicClient'] = {
|
|
155
|
+
redirectUris: [
|
|
156
|
+
`msauth://code/msauth.${options.bundleId}%3A%2F%2Fauth`,
|
|
157
|
+
`msauth.${options.bundleId}://auth`
|
|
158
|
+
]
|
|
159
|
+
};
|
|
160
|
+
}
|
|
146
161
|
if (options.implicitFlow) {
|
|
147
162
|
if (!applicationInfo.web) {
|
|
148
163
|
applicationInfo.web = {};
|
|
@@ -31,7 +31,7 @@ m365 entra appregistration add [options]
|
|
|
31
31
|
: Comma-separated list of redirect URIs. Requires `platform` to be specified.
|
|
32
32
|
|
|
33
33
|
`-p, --platform [platform]`
|
|
34
|
-
: Platform for which the
|
|
34
|
+
: Platform for which the app should be configured. Allowed values `spa`, `web`, `publicClient`, `apple`, `android`.
|
|
35
35
|
|
|
36
36
|
`--implicitFlow`
|
|
37
37
|
: Specify, to indicate that the authorization endpoint should return ID and access tokens.
|
|
@@ -75,6 +75,12 @@ m365 entra appregistration add [options]
|
|
|
75
75
|
`--manifest [manifest]`
|
|
76
76
|
: App manifest as retrieved from Entra ID to create the app registration from. Specify either `name` or `manifest` but not both.
|
|
77
77
|
|
|
78
|
+
`--bundleId [bundleId]`
|
|
79
|
+
: Specify a bundle Id to add the iOS / macOS or Android platform to the application. Required when platform is `apple` or `android`.
|
|
80
|
+
|
|
81
|
+
`--signatureHash [signatureHash]`
|
|
82
|
+
: A required hash when specifying a bundle Id and platform `android`.
|
|
83
|
+
|
|
78
84
|
`--save`
|
|
79
85
|
: Use to store the information about the created app in a local file.
|
|
80
86
|
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# outlook mail searchfolder add
|
|
6
|
+
|
|
7
|
+
Creates a new mail search folder in the user's mailbox
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 outlook mail searchfolder add [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --userId [userId]`
|
|
19
|
+
: The id of the user in whose mailbox the search folder should be created. Specify either `userId` or `userName`, but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --userName [userName]`
|
|
22
|
+
: The UPN of the user in whose mailbox the search folder should be created. Specify either `userId` or `userName`, but not both.
|
|
23
|
+
|
|
24
|
+
`--folderName <folderName>`
|
|
25
|
+
: The name of the mail search folder.
|
|
26
|
+
|
|
27
|
+
`--sourceFolderIds <sourceFolderIds>`
|
|
28
|
+
: Comma-separated list of mail folders that should be searched.
|
|
29
|
+
|
|
30
|
+
`--includeNestedFolders`
|
|
31
|
+
: The nested mail folders will be searched if specified.
|
|
32
|
+
|
|
33
|
+
`--messageFilter <messageFilter>`
|
|
34
|
+
: The OData query to filter the messages.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
<Global />
|
|
38
|
+
|
|
39
|
+
## Permissions
|
|
40
|
+
|
|
41
|
+
<Tabs>
|
|
42
|
+
<TabItem value="Delegated">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|-----------------|----------------|
|
|
46
|
+
| Microsoft Graph | Mail.ReadWrite |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
<TabItem value="Application">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|-----------------|----------------|
|
|
53
|
+
| Microsoft Graph | Mail.ReadWrite |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
</Tabs>
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
Create a mail search folder in the user's mailbox specified by id for messages from the inbox that contain specific subject
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 outlook mail searchfolder add --userId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --folderName 'CLI m365' --sourceFolderIds 'AQMkADYAAAIBDAAAAA==' --messageFilter "contains(subject, 'CLI for Microsoft 365')"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Create a mail search folder in the user's mailbox specified by UPN for incoming and outgoing messages from a specific year that contain specific text in a message body, search for messages inside all subfolders
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 outlook mail searchfolder add --userName john.doe@contoso.com --folderName 'Power Platform Community' --sourceFolderIds 'AQMkADYAAAIBDAAAAA==,AQMkADYAAAIBDBBBBB==' --includeNestedFolders --messageFilter "contains(body/content,'Power Platform') AND receivedDateTime ge 2024-01-01 AND receivedDateTime le 2024-12-31"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Response
|
|
73
|
+
|
|
74
|
+
<Tabs>
|
|
75
|
+
<TabItem value="JSON">
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"id": "AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco84sgAAAA==",
|
|
80
|
+
"displayName": "Microsoft Entra",
|
|
81
|
+
"parentFolderId": "AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEEAAAA",
|
|
82
|
+
"childFolderCount": 0,
|
|
83
|
+
"unreadItemCount": 27,
|
|
84
|
+
"totalItemCount": 41,
|
|
85
|
+
"sizeInBytes": null,
|
|
86
|
+
"isHidden": false,
|
|
87
|
+
"isSupported": true,
|
|
88
|
+
"includeNestedFolders": false,
|
|
89
|
+
"sourceFolderIds": [
|
|
90
|
+
"AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEMAAAA"
|
|
91
|
+
],
|
|
92
|
+
"filterQuery": "contains(subject,'Microsoft Entra ID')"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
</TabItem>
|
|
97
|
+
<TabItem value="Text">
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
childFolderCount : 0
|
|
101
|
+
displayName : Microsoft Entra
|
|
102
|
+
filterQuery : contains(subject,'Microsoft Entra ID')
|
|
103
|
+
id : AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco88nAAAAA==
|
|
104
|
+
includeNestedFolders: false
|
|
105
|
+
isHidden : false
|
|
106
|
+
isSupported : true
|
|
107
|
+
parentFolderId : AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEEAAAA
|
|
108
|
+
sizeInBytes : null
|
|
109
|
+
sourceFolderIds : ["AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEMAAAA"]
|
|
110
|
+
totalItemCount : 41
|
|
111
|
+
unreadItemCount : 27
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
</TabItem>
|
|
115
|
+
<TabItem value="CSV">
|
|
116
|
+
|
|
117
|
+
```csv
|
|
118
|
+
id,displayName,parentFolderId,childFolderCount,unreadItemCount,totalItemCount,sizeInBytes,isHidden,isSupported,includeNestedFolders,filterQuery
|
|
119
|
+
AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco88ngAAAA==,Microsoft Entra,AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEEAAAA,0,27,41,,,1,,"contains(subject,'Microsoft Entra ID')"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
</TabItem>
|
|
123
|
+
<TabItem value="Markdown">
|
|
124
|
+
|
|
125
|
+
```md
|
|
126
|
+
# outlook mail searchfolder add --debug "false" --verbose "false" --userName "john.doe@contoso.com" --folderName "Microsoft Entra4" --messageFilter "contains(subject,'Microsoft Entra ID')" --sourceFoldersIds "AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEMAAAA"
|
|
127
|
+
|
|
128
|
+
Date: 9/6/2024
|
|
129
|
+
|
|
130
|
+
## Microsoft Entra (AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco88oAAAAA==)
|
|
131
|
+
|
|
132
|
+
Property | Value
|
|
133
|
+
---------|-------
|
|
134
|
+
id | AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQABco88oAAAAA==
|
|
135
|
+
displayName | Microsoft Entra
|
|
136
|
+
parentFolderId | AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YHqjbDnRgQAAAgEEAAAA
|
|
137
|
+
childFolderCount | 0
|
|
138
|
+
unreadItemCount | 27
|
|
139
|
+
totalItemCount | 41
|
|
140
|
+
isHidden | false
|
|
141
|
+
isSupported | true
|
|
142
|
+
includeNestedFolders | false
|
|
143
|
+
filterQuery | contains(subject,'Microsoft Entra ID')
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
</TabItem>
|
|
147
|
+
</Tabs>
|