@pnp/cli-microsoft365 12.0.0-beta.d58fb77 → 12.0.0-beta.e3af9f8
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +4 -1
- package/dist/cli/cli.js +3 -0
- package/dist/m365/entra/commands/m365group/m365group-add.js +52 -97
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +20 -33
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +20 -39
- package/dist/m365/entra/commands/m365group/m365group-get.js +20 -41
- package/dist/m365/entra/commands/m365group/m365group-list.js +11 -31
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +8 -22
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +9 -25
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +21 -43
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +21 -41
- package/dist/m365/entra/commands/m365group/m365group-remove.js +25 -46
- package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -32
- package/dist/m365/entra/commands/m365group/m365group-set.js +86 -141
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +20 -43
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +44 -77
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +28 -55
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +37 -74
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +45 -77
- package/dist/m365/spe/commands/container/container-permission-remove.js +94 -0
- package/dist/m365/spe/commands.js +1 -0
- package/dist/m365/spo/commands/listitem/listitem-add.js +27 -55
- package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +30 -58
- package/dist/m365/spo/commands/listitem/listitem-attachment-get.js +27 -52
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +26 -50
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +28 -55
- package/dist/m365/spo/commands/listitem/listitem-attachment-set.js +30 -57
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +36 -58
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +68 -92
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +37 -57
- package/dist/m365/spo/commands/listitem/listitem-get.js +45 -68
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +31 -55
- package/dist/m365/spo/commands/listitem/listitem-list.js +47 -81
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +37 -60
- package/dist/m365/spo/commands/listitem/listitem-record-lock.js +30 -52
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +31 -52
- package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +30 -52
- package/dist/m365/spo/commands/listitem/listitem-remove.js +33 -61
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +46 -67
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +33 -56
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +55 -98
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +48 -74
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +33 -56
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +31 -53
- package/dist/m365/spo/commands/listitem/listitem-set.js +33 -58
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +8 -1
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -1
- package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +22 -0
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +19 -39
- package/dist/m365/teams/commands/report/report-pstncalls.js +19 -39
- package/dist/m365/teams/commands/report/report-useractivitycounts.js +10 -0
- package/dist/m365/teams/commands/report/report-useractivityusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +22 -0
- package/dist/m365/teams/commands/tab/tab-add.js +23 -49
- package/dist/m365/teams/commands/tab/tab-get.js +55 -56
- package/dist/m365/teams/commands/tab/tab-list.js +17 -28
- package/dist/m365/teams/commands/tab/tab-remove.js +23 -42
- package/dist/m365/teams/commands/team/team-add.js +76 -114
- package/dist/m365/teams/commands/team/team-app-list.js +23 -36
- package/dist/m365/teams/commands/team/team-archive.js +24 -39
- package/dist/m365/teams/commands/team/team-clone.js +28 -62
- package/dist/m365/teams/commands/team/team-get.js +23 -36
- package/dist/m365/teams/commands/team/team-list.js +43 -57
- package/dist/m365/teams/commands/team/team-remove.js +24 -37
- package/dist/m365/teams/commands/team/team-set.js +23 -52
- package/dist/m365/teams/commands/team/team-unarchive.js +23 -28
- package/dist/m365/teams/commands/user/user-app-add.js +40 -49
- package/dist/m365/teams/commands/user/user-app-list.js +26 -39
- package/dist/m365/teams/commands/user/user-app-remove.js +37 -49
- package/dist/m365/teams/commands/user/user-app-upgrade.js +36 -52
- package/dist/m365/teams/commands/user/user-list.js +17 -39
- package/dist/m365/tenant/commands/report/report-activeusercounts.js +2 -1
- package/dist/m365/tenant/commands/report/report-activeuserdetail.js +2 -1
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +9 -0
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +9 -0
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +9 -0
- package/dist/m365/tenant/commands/report/report-servicesusercounts.js +2 -1
- package/dist/m365/tenant/commands/report/report-settings-get.js +5 -0
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +9 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +8 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +8 -15
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +8 -15
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +12 -26
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +8 -22
- package/dist/utils/zod.js +4 -4
- package/docs/docs/cmd/spe/container/container-permission-remove.mdx +78 -0
- package/package.json +1 -1
|
@@ -111,6 +111,13 @@ class SpoTenantApplicationCustomizerAddCommand extends SpoCommand {
|
|
|
111
111
|
if (this.verbose) {
|
|
112
112
|
await logger.logToStderr('Pre-checks finished. Adding tenant wide extension to the TenantWideExtensions list');
|
|
113
113
|
}
|
|
114
|
+
const output = options.output === 'text' ||
|
|
115
|
+
options.output === 'csv' ||
|
|
116
|
+
options.output === 'json' ||
|
|
117
|
+
options.output === 'md' ||
|
|
118
|
+
options.output === 'none'
|
|
119
|
+
? options.output
|
|
120
|
+
: undefined;
|
|
114
121
|
const commandOptions = {
|
|
115
122
|
webUrl: appCatalogUrl,
|
|
116
123
|
listUrl: `${urlUtil.getServerRelativeSiteUrl(appCatalogUrl)}/Lists/TenantWideExtensions`,
|
|
@@ -125,7 +132,7 @@ class SpoTenantApplicationCustomizerAddCommand extends SpoCommand {
|
|
|
125
132
|
TenantWideExtensionDisabled: false,
|
|
126
133
|
verbose: this.verbose,
|
|
127
134
|
debug: this.debug,
|
|
128
|
-
output:
|
|
135
|
+
output: output
|
|
129
136
|
};
|
|
130
137
|
await cli.executeCommand(spoListItemAddCommand, { options: { ...commandOptions, _: [] } });
|
|
131
138
|
}
|
|
@@ -111,6 +111,13 @@ class SpoTenantCommandSetAddCommand extends SpoCommand {
|
|
|
111
111
|
if (this.verbose) {
|
|
112
112
|
await logger.logToStderr('Pre-checks finished. Adding tenant wide extension to the TenantWideExtensions list');
|
|
113
113
|
}
|
|
114
|
+
const output = options.output === 'text' ||
|
|
115
|
+
options.output === 'csv' ||
|
|
116
|
+
options.output === 'json' ||
|
|
117
|
+
options.output === 'md' ||
|
|
118
|
+
options.output === 'none'
|
|
119
|
+
? options.output
|
|
120
|
+
: undefined;
|
|
114
121
|
const commandOptions = {
|
|
115
122
|
webUrl: appCatalogUrl,
|
|
116
123
|
listUrl: `${urlUtil.getServerRelativeSiteUrl(appCatalogUrl)}/Lists/TenantWideExtensions`,
|
|
@@ -124,7 +131,7 @@ class SpoTenantCommandSetAddCommand extends SpoCommand {
|
|
|
124
131
|
TenantWideExtensionDisabled: false,
|
|
125
132
|
verbose: this.verbose,
|
|
126
133
|
debug: this.debug,
|
|
127
|
-
output:
|
|
134
|
+
output: output
|
|
128
135
|
};
|
|
129
136
|
await cli.executeCommand(spoListItemAddCommand, { options: { ...commandOptions, _: [] } });
|
|
130
137
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
3
|
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
2
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = z.strictObject({
|
|
6
|
+
...globalOptionsZod.shape,
|
|
7
|
+
output: z.enum(['csv', 'json']).optional().alias('o'),
|
|
8
|
+
period: z.enum(['D7', 'D30', 'D90', 'D180']).alias('p')
|
|
9
|
+
});
|
|
3
10
|
class TeamsReportDeviceUsageDistributionUserCountsCommand extends PeriodBasedReport {
|
|
4
11
|
get name() {
|
|
5
12
|
return commands.REPORT_DEVICEUSAGEDISTRIBUTIONUSERCOUNTS;
|
|
@@ -10,6 +17,9 @@ class TeamsReportDeviceUsageDistributionUserCountsCommand extends PeriodBasedRep
|
|
|
10
17
|
get description() {
|
|
11
18
|
return 'Gets the number of Microsoft Teams unique users by device type';
|
|
12
19
|
}
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
22
|
+
}
|
|
13
23
|
}
|
|
14
24
|
export default new TeamsReportDeviceUsageDistributionUserCountsCommand();
|
|
15
25
|
//# sourceMappingURL=report-deviceusagedistributionusercounts.js.map
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
3
|
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
2
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = z.strictObject({
|
|
6
|
+
...globalOptionsZod.shape,
|
|
7
|
+
output: z.enum(['csv', 'json']).optional().alias('o'),
|
|
8
|
+
period: z.enum(['D7', 'D30', 'D90', 'D180']).alias('p')
|
|
9
|
+
});
|
|
3
10
|
class TeamsReportDeviceUsageUserCountsCommand extends PeriodBasedReport {
|
|
4
11
|
get name() {
|
|
5
12
|
return commands.REPORT_DEVICEUSAGEUSERCOUNTS;
|
|
@@ -10,6 +17,9 @@ class TeamsReportDeviceUsageUserCountsCommand extends PeriodBasedReport {
|
|
|
10
17
|
get usageEndpoint() {
|
|
11
18
|
return 'getTeamsDeviceUsageUserCounts';
|
|
12
19
|
}
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
22
|
+
}
|
|
13
23
|
}
|
|
14
24
|
export default new TeamsReportDeviceUsageUserCountsCommand();
|
|
15
25
|
//# sourceMappingURL=report-deviceusageusercounts.js.map
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
3
|
import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
|
|
2
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = z.strictObject({
|
|
6
|
+
...globalOptionsZod.shape,
|
|
7
|
+
output: z.enum(['csv', 'json']).optional().alias('o'),
|
|
8
|
+
period: z.enum(['D7', 'D30', 'D90', 'D180']).optional().alias('p'),
|
|
9
|
+
date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'The supported date format is YYYY-MM-DD').optional().alias('d')
|
|
10
|
+
});
|
|
3
11
|
class TeamsReportDeviceUsageUserDetailCommand extends DateAndPeriodBasedReport {
|
|
4
12
|
get name() {
|
|
5
13
|
return commands.REPORT_DEVICEUSAGEUSERDETAIL;
|
|
@@ -10,6 +18,20 @@ class TeamsReportDeviceUsageUserDetailCommand extends DateAndPeriodBasedReport {
|
|
|
10
18
|
get usageEndpoint() {
|
|
11
19
|
return 'getTeamsDeviceUsageUserDetail';
|
|
12
20
|
}
|
|
21
|
+
get schema() {
|
|
22
|
+
return options;
|
|
23
|
+
}
|
|
24
|
+
getRefinedSchema(schema) {
|
|
25
|
+
return schema
|
|
26
|
+
.refine((opts) => opts.period !== undefined || opts.date !== undefined, {
|
|
27
|
+
message: 'Specify period or date, one is required.',
|
|
28
|
+
params: { customCode: 'optionSet', options: ['period', 'date'] }
|
|
29
|
+
})
|
|
30
|
+
.refine((opts) => !(opts.period !== undefined && opts.date !== undefined), {
|
|
31
|
+
message: 'Specify period or date but not both.',
|
|
32
|
+
params: { customCode: 'optionSet', options: ['period', 'date'] }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
13
35
|
}
|
|
14
36
|
export default new TeamsReportDeviceUsageUserDetailCommand();
|
|
15
37
|
//# sourceMappingURL=report-deviceusageuserdetail.js.map
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _TeamsReportDirectroutingcallsCommand_instances, _TeamsReportDirectroutingcallsCommand_initTelemetry, _TeamsReportDirectroutingcallsCommand_initOptions, _TeamsReportDirectroutingcallsCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
4
|
import { odata } from '../../../../utils/odata.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import GraphApplicationCommand from '../../../base/GraphCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
output: z.enum(['csv', 'json']).optional().alias('o'),
|
|
11
|
+
fromDateTime: z.string().refine(val => validation.isValidISODateDashOnly(val), {
|
|
12
|
+
message: 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)'
|
|
13
|
+
}),
|
|
14
|
+
toDateTime: z.string().refine(val => validation.isValidISODateDashOnly(val), {
|
|
15
|
+
message: 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)'
|
|
16
|
+
}).optional()
|
|
17
|
+
});
|
|
12
18
|
class TeamsReportDirectroutingcallsCommand extends GraphApplicationCommand {
|
|
13
19
|
get allowedOutputs() {
|
|
14
20
|
return ['json', 'csv'];
|
|
@@ -22,12 +28,13 @@ class TeamsReportDirectroutingcallsCommand extends GraphApplicationCommand {
|
|
|
22
28
|
defaultProperties() {
|
|
23
29
|
return ['id', 'calleeNumber', 'callerNumber', 'startDateTime'];
|
|
24
30
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
get schema() {
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
getRefinedSchema(schema) {
|
|
35
|
+
return schema.refine(opts => Math.ceil((new Date(opts.toDateTime || new Date().toISOString()).getTime() - new Date(opts.fromDateTime).getTime()) / (1000 * 3600 * 24)) <= 90, {
|
|
36
|
+
message: 'The maximum number of days between fromDateTime and toDateTime cannot exceed 90'
|
|
37
|
+
});
|
|
31
38
|
}
|
|
32
39
|
async commandAction(logger, args) {
|
|
33
40
|
const toDateTimeParameter = formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
|
|
@@ -40,32 +47,5 @@ class TeamsReportDirectroutingcallsCommand extends GraphApplicationCommand {
|
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
|
-
_TeamsReportDirectroutingcallsCommand_instances = new WeakSet(), _TeamsReportDirectroutingcallsCommand_initTelemetry = function _TeamsReportDirectroutingcallsCommand_initTelemetry() {
|
|
44
|
-
this.telemetry.push((args) => {
|
|
45
|
-
Object.assign(this.telemetryProperties, {
|
|
46
|
-
toDateTime: typeof args.options.toDateTime !== 'undefined'
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}, _TeamsReportDirectroutingcallsCommand_initOptions = function _TeamsReportDirectroutingcallsCommand_initOptions() {
|
|
50
|
-
this.options.unshift({
|
|
51
|
-
option: '--fromDateTime <fromDateTime>'
|
|
52
|
-
}, {
|
|
53
|
-
option: '--toDateTime [toDateTime]'
|
|
54
|
-
});
|
|
55
|
-
}, _TeamsReportDirectroutingcallsCommand_initValidators = function _TeamsReportDirectroutingcallsCommand_initValidators() {
|
|
56
|
-
this.validators.push(async (args) => {
|
|
57
|
-
if (!validation.isValidISODateDashOnly(args.options.fromDateTime)) {
|
|
58
|
-
return 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)';
|
|
59
|
-
}
|
|
60
|
-
if (args.options.toDateTime &&
|
|
61
|
-
!validation.isValidISODateDashOnly(args.options.toDateTime)) {
|
|
62
|
-
return 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)';
|
|
63
|
-
}
|
|
64
|
-
if (Math.ceil((new Date(args.options.toDateTime || new Date().toISOString()).getTime() - new Date(args.options.fromDateTime).getTime()) / (1000 * 3600 * 24)) > 90) {
|
|
65
|
-
return 'The maximum number of days between fromDateTime and toDateTime cannot exceed 90';
|
|
66
|
-
}
|
|
67
|
-
return true;
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
50
|
export default new TeamsReportDirectroutingcallsCommand();
|
|
71
51
|
//# sourceMappingURL=report-directroutingcalls.js.map
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _TeamsReportPstncallsCommand_instances, _TeamsReportPstncallsCommand_initTelemetry, _TeamsReportPstncallsCommand_initOptions, _TeamsReportPstncallsCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
4
|
import { odata } from '../../../../utils/odata.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import GraphApplicationCommand from '../../../base/GraphCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
output: z.enum(['csv', 'json']).optional().alias('o'),
|
|
11
|
+
fromDateTime: z.string().refine(val => validation.isValidISODateDashOnly(val), {
|
|
12
|
+
message: 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)'
|
|
13
|
+
}),
|
|
14
|
+
toDateTime: z.string().refine(val => validation.isValidISODateDashOnly(val), {
|
|
15
|
+
message: 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)'
|
|
16
|
+
}).optional()
|
|
17
|
+
});
|
|
12
18
|
class TeamsReportPstncallsCommand extends GraphApplicationCommand {
|
|
13
19
|
get allowedOutputs() {
|
|
14
20
|
return ['json', 'csv'];
|
|
@@ -22,12 +28,13 @@ class TeamsReportPstncallsCommand extends GraphApplicationCommand {
|
|
|
22
28
|
defaultProperties() {
|
|
23
29
|
return ['id', 'calleeNumber', 'callerNumber', 'startDateTime'];
|
|
24
30
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
get schema() {
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
getRefinedSchema(schema) {
|
|
35
|
+
return schema.refine(opts => Math.ceil((new Date(opts.toDateTime || new Date().toISOString()).getTime() - new Date(opts.fromDateTime).getTime()) / (1000 * 3600 * 24)) <= 90, {
|
|
36
|
+
message: 'The maximum number of days between fromDateTime and toDateTime cannot exceed 90'
|
|
37
|
+
});
|
|
31
38
|
}
|
|
32
39
|
async commandAction(logger, args) {
|
|
33
40
|
const toDateTimeParameter = formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
|
|
@@ -40,32 +47,5 @@ class TeamsReportPstncallsCommand extends GraphApplicationCommand {
|
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
|
-
_TeamsReportPstncallsCommand_instances = new WeakSet(), _TeamsReportPstncallsCommand_initTelemetry = function _TeamsReportPstncallsCommand_initTelemetry() {
|
|
44
|
-
this.telemetry.push((args) => {
|
|
45
|
-
Object.assign(this.telemetryProperties, {
|
|
46
|
-
toDateTime: typeof args.options.toDateTime !== 'undefined'
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}, _TeamsReportPstncallsCommand_initOptions = function _TeamsReportPstncallsCommand_initOptions() {
|
|
50
|
-
this.options.unshift({
|
|
51
|
-
option: '--fromDateTime <fromDateTime>'
|
|
52
|
-
}, {
|
|
53
|
-
option: '--toDateTime [toDateTime]'
|
|
54
|
-
});
|
|
55
|
-
}, _TeamsReportPstncallsCommand_initValidators = function _TeamsReportPstncallsCommand_initValidators() {
|
|
56
|
-
this.validators.push(async (args) => {
|
|
57
|
-
if (!validation.isValidISODateDashOnly(args.options.fromDateTime)) {
|
|
58
|
-
return 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)';
|
|
59
|
-
}
|
|
60
|
-
if (args.options.toDateTime &&
|
|
61
|
-
!validation.isValidISODateDashOnly(args.options.toDateTime)) {
|
|
62
|
-
return 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)';
|
|
63
|
-
}
|
|
64
|
-
if (Math.ceil((new Date(args.options.toDateTime || new Date().toISOString()).getTime() - new Date(args.options.fromDateTime).getTime()) / (1000 * 3600 * 24)) > 90) {
|
|
65
|
-
return 'The maximum number of days between fromDateTime and toDateTime cannot exceed 90';
|
|
66
|
-
}
|
|
67
|
-
return true;
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
50
|
export default new TeamsReportPstncallsCommand();
|
|
71
51
|
//# sourceMappingURL=report-pstncalls.js.map
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
3
|
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
2
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = z.strictObject({
|
|
6
|
+
...globalOptionsZod.shape,
|
|
7
|
+
output: z.enum(['csv', 'json']).optional().alias('o'),
|
|
8
|
+
period: z.enum(['D7', 'D30', 'D90', 'D180']).alias('p')
|
|
9
|
+
});
|
|
3
10
|
class TeamsReportUserActivityCountsCommand extends PeriodBasedReport {
|
|
4
11
|
get name() {
|
|
5
12
|
return commands.REPORT_USERACTIVITYCOUNTS;
|
|
@@ -10,6 +17,9 @@ class TeamsReportUserActivityCountsCommand extends PeriodBasedReport {
|
|
|
10
17
|
get usageEndpoint() {
|
|
11
18
|
return 'getTeamsUserActivityCounts';
|
|
12
19
|
}
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
22
|
+
}
|
|
13
23
|
}
|
|
14
24
|
export default new TeamsReportUserActivityCountsCommand();
|
|
15
25
|
//# sourceMappingURL=report-useractivitycounts.js.map
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
3
|
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
2
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = z.strictObject({
|
|
6
|
+
...globalOptionsZod.shape,
|
|
7
|
+
output: z.enum(['csv', 'json']).optional().alias('o'),
|
|
8
|
+
period: z.enum(['D7', 'D30', 'D90', 'D180']).alias('p')
|
|
9
|
+
});
|
|
3
10
|
class TeamsReportUserActivityUserCountsCommand extends PeriodBasedReport {
|
|
4
11
|
get name() {
|
|
5
12
|
return commands.REPORT_USERACTIVITYUSERCOUNTS;
|
|
@@ -10,6 +17,9 @@ class TeamsReportUserActivityUserCountsCommand extends PeriodBasedReport {
|
|
|
10
17
|
get usageEndpoint() {
|
|
11
18
|
return 'getTeamsUserActivityUserCounts';
|
|
12
19
|
}
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
22
|
+
}
|
|
13
23
|
}
|
|
14
24
|
export default new TeamsReportUserActivityUserCountsCommand();
|
|
15
25
|
//# sourceMappingURL=report-useractivityusercounts.js.map
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
3
|
import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
|
|
2
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = z.strictObject({
|
|
6
|
+
...globalOptionsZod.shape,
|
|
7
|
+
output: z.enum(['csv', 'json']).optional().alias('o'),
|
|
8
|
+
period: z.enum(['D7', 'D30', 'D90', 'D180']).optional().alias('p'),
|
|
9
|
+
date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'The supported date format is YYYY-MM-DD').optional().alias('d')
|
|
10
|
+
});
|
|
3
11
|
class TeamsReportUserActivityUserDetailCommand extends DateAndPeriodBasedReport {
|
|
4
12
|
get name() {
|
|
5
13
|
return commands.REPORT_USERACTIVITYUSERDETAIL;
|
|
@@ -10,6 +18,20 @@ class TeamsReportUserActivityUserDetailCommand extends DateAndPeriodBasedReport
|
|
|
10
18
|
get description() {
|
|
11
19
|
return 'Gets details about Microsoft Teams user activity by user.';
|
|
12
20
|
}
|
|
21
|
+
get schema() {
|
|
22
|
+
return options;
|
|
23
|
+
}
|
|
24
|
+
getRefinedSchema(schema) {
|
|
25
|
+
return schema
|
|
26
|
+
.refine((opts) => opts.period !== undefined || opts.date !== undefined, {
|
|
27
|
+
message: 'Specify period or date, one is required.',
|
|
28
|
+
params: { customCode: 'optionSet', options: ['period', 'date'] }
|
|
29
|
+
})
|
|
30
|
+
.refine((opts) => !(opts.period !== undefined && opts.date !== undefined), {
|
|
31
|
+
message: 'Specify period or date but not both.',
|
|
32
|
+
params: { customCode: 'optionSet', options: ['period', 'date'] }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
13
35
|
}
|
|
14
36
|
export default new TeamsReportUserActivityUserDetailCommand();
|
|
15
37
|
//# sourceMappingURL=report-useractivityuserdetail.js.map
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _TeamsTabAddCommand_instances, _TeamsTabAddCommand_initTelemetry, _TeamsTabAddCommand_initOptions, _TeamsTabAddCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.object({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
teamId: z.string()
|
|
11
|
+
.refine(val => validation.isValidGuid(val), {
|
|
12
|
+
message: 'The value must be a valid GUID.'
|
|
13
|
+
})
|
|
14
|
+
.alias('i'),
|
|
15
|
+
channelId: z.string()
|
|
16
|
+
.refine(val => validation.isValidTeamsChannelId(val), {
|
|
17
|
+
message: 'The value must be a valid Teams channel ID.'
|
|
18
|
+
})
|
|
19
|
+
.alias('c'),
|
|
20
|
+
appId: z.string(),
|
|
21
|
+
appName: z.string(),
|
|
22
|
+
contentUrl: z.string(),
|
|
23
|
+
entityId: z.string().optional(),
|
|
24
|
+
removeUrl: z.string().optional(),
|
|
25
|
+
websiteUrl: z.string().optional()
|
|
26
|
+
}).catchall(z.unknown());
|
|
12
27
|
class TeamsTabAddCommand extends GraphCommand {
|
|
13
28
|
get name() {
|
|
14
29
|
return commands.TAB_ADD;
|
|
@@ -19,12 +34,8 @@ class TeamsTabAddCommand extends GraphCommand {
|
|
|
19
34
|
get description() {
|
|
20
35
|
return 'Adds a tab to the specified channel';
|
|
21
36
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_TeamsTabAddCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _TeamsTabAddCommand_instances, "m", _TeamsTabAddCommand_initTelemetry).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _TeamsTabAddCommand_instances, "m", _TeamsTabAddCommand_initOptions).call(this);
|
|
27
|
-
__classPrivateFieldGet(this, _TeamsTabAddCommand_instances, "m", _TeamsTabAddCommand_initValidators).call(this);
|
|
37
|
+
get schema() {
|
|
38
|
+
return options;
|
|
28
39
|
}
|
|
29
40
|
async commandAction(logger, args) {
|
|
30
41
|
const data = this.mapRequestBody(args.options);
|
|
@@ -87,42 +98,5 @@ class TeamsTabAddCommand extends GraphCommand {
|
|
|
87
98
|
return requestBody;
|
|
88
99
|
}
|
|
89
100
|
}
|
|
90
|
-
_TeamsTabAddCommand_instances = new WeakSet(), _TeamsTabAddCommand_initTelemetry = function _TeamsTabAddCommand_initTelemetry() {
|
|
91
|
-
this.telemetry.push((args) => {
|
|
92
|
-
Object.assign(this.telemetryProperties, {
|
|
93
|
-
entityId: typeof args.options.entityId !== 'undefined',
|
|
94
|
-
removeUrl: typeof args.options.removeUrl !== 'undefined',
|
|
95
|
-
websiteUrl: typeof args.options.websiteUrl !== 'undefined'
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
}, _TeamsTabAddCommand_initOptions = function _TeamsTabAddCommand_initOptions() {
|
|
99
|
-
this.options.unshift({
|
|
100
|
-
option: '-i, --teamId <teamId>'
|
|
101
|
-
}, {
|
|
102
|
-
option: '-c, --channelId <channelId>'
|
|
103
|
-
}, {
|
|
104
|
-
option: '--appId <appId>'
|
|
105
|
-
}, {
|
|
106
|
-
option: '--appName <appName>'
|
|
107
|
-
}, {
|
|
108
|
-
option: '--contentUrl <contentUrl>'
|
|
109
|
-
}, {
|
|
110
|
-
option: '--entityId [entityId]'
|
|
111
|
-
}, {
|
|
112
|
-
option: '--removeUrl [removeUrl]'
|
|
113
|
-
}, {
|
|
114
|
-
option: '--websiteUrl [websiteUrl]'
|
|
115
|
-
});
|
|
116
|
-
}, _TeamsTabAddCommand_initValidators = function _TeamsTabAddCommand_initValidators() {
|
|
117
|
-
this.validators.push(async (args) => {
|
|
118
|
-
if (!validation.isValidGuid(args.options.teamId)) {
|
|
119
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
120
|
-
}
|
|
121
|
-
if (!validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
122
|
-
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
123
|
-
}
|
|
124
|
-
return true;
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
101
|
export default new TeamsTabAddCommand();
|
|
128
102
|
//# sourceMappingURL=tab-add.js.map
|
|
@@ -1,31 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _TeamsTabGetCommand_instances, _TeamsTabGetCommand_initTelemetry, _TeamsTabGetCommand_initOptions, _TeamsTabGetCommand_initValidators, _TeamsTabGetCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
5
|
import { teams } from '../../../../utils/teams.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
teamId: z.string()
|
|
12
|
+
.refine(val => validation.isValidGuid(val), {
|
|
13
|
+
message: 'The value must be a valid GUID.'
|
|
14
|
+
})
|
|
15
|
+
.optional(),
|
|
16
|
+
teamName: z.string().optional(),
|
|
17
|
+
channelId: z.string()
|
|
18
|
+
.refine(val => validation.isValidTeamsChannelId(val), {
|
|
19
|
+
message: 'The value must be a valid Teams channel ID.'
|
|
20
|
+
})
|
|
21
|
+
.optional(),
|
|
22
|
+
channelName: z.string().optional(),
|
|
23
|
+
id: z.string()
|
|
24
|
+
.refine(val => validation.isValidGuid(val), {
|
|
25
|
+
message: 'The value must be a valid GUID.'
|
|
26
|
+
})
|
|
27
|
+
.optional()
|
|
28
|
+
.alias('i'),
|
|
29
|
+
name: z.string().optional().alias('n')
|
|
30
|
+
});
|
|
13
31
|
class TeamsTabGetCommand extends GraphCommand {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
this.teamId = "";
|
|
35
|
+
this.channelId = "";
|
|
36
|
+
}
|
|
14
37
|
get name() {
|
|
15
38
|
return commands.TAB_GET;
|
|
16
39
|
}
|
|
17
40
|
get description() {
|
|
18
41
|
return 'Gets information about the specified Microsoft Teams tab';
|
|
19
42
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
get schema() {
|
|
44
|
+
return options;
|
|
45
|
+
}
|
|
46
|
+
getRefinedSchema(schema) {
|
|
47
|
+
return schema
|
|
48
|
+
.refine(opts => [opts.teamId, opts.teamName].filter(x => x !== undefined).length === 1, {
|
|
49
|
+
message: `Specify either 'teamId' or 'teamName', but not both.`,
|
|
50
|
+
params: {
|
|
51
|
+
customCode: 'optionSet',
|
|
52
|
+
options: ['teamId', 'teamName']
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
.refine(opts => [opts.channelId, opts.channelName].filter(x => x !== undefined).length === 1, {
|
|
56
|
+
message: `Specify either 'channelId' or 'channelName', but not both.`,
|
|
57
|
+
params: {
|
|
58
|
+
customCode: 'optionSet',
|
|
59
|
+
options: ['channelId', 'channelName']
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
63
|
+
message: `Specify either 'id' or 'name', but not both.`,
|
|
64
|
+
params: {
|
|
65
|
+
customCode: 'optionSet',
|
|
66
|
+
options: ['id', 'name']
|
|
67
|
+
}
|
|
68
|
+
});
|
|
29
69
|
}
|
|
30
70
|
async getTeamId(args) {
|
|
31
71
|
if (args.options.teamId) {
|
|
@@ -90,46 +130,5 @@ class TeamsTabGetCommand extends GraphCommand {
|
|
|
90
130
|
}
|
|
91
131
|
}
|
|
92
132
|
}
|
|
93
|
-
_TeamsTabGetCommand_instances = new WeakSet(), _TeamsTabGetCommand_initTelemetry = function _TeamsTabGetCommand_initTelemetry() {
|
|
94
|
-
this.telemetry.push((args) => {
|
|
95
|
-
Object.assign(this.telemetryProperties, {
|
|
96
|
-
teamId: typeof args.options.teamId !== 'undefined',
|
|
97
|
-
teamName: typeof args.options.teamName !== 'undefined',
|
|
98
|
-
channelId: typeof args.options.channelId !== 'undefined',
|
|
99
|
-
channelName: typeof args.options.channelName !== 'undefined',
|
|
100
|
-
id: typeof args.options.id !== 'undefined',
|
|
101
|
-
name: typeof args.options.name !== 'undefined'
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
}, _TeamsTabGetCommand_initOptions = function _TeamsTabGetCommand_initOptions() {
|
|
105
|
-
this.options.unshift({
|
|
106
|
-
option: '--teamId [teamId]'
|
|
107
|
-
}, {
|
|
108
|
-
option: '--teamName [teamName]'
|
|
109
|
-
}, {
|
|
110
|
-
option: '--channelId [channelId]'
|
|
111
|
-
}, {
|
|
112
|
-
option: '--channelName [channelName]'
|
|
113
|
-
}, {
|
|
114
|
-
option: '-i, --id [id]'
|
|
115
|
-
}, {
|
|
116
|
-
option: '-n, --name [name]'
|
|
117
|
-
});
|
|
118
|
-
}, _TeamsTabGetCommand_initValidators = function _TeamsTabGetCommand_initValidators() {
|
|
119
|
-
this.validators.push(async (args) => {
|
|
120
|
-
if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
|
|
121
|
-
return `${args.options.teamId} is not a valid GUID`;
|
|
122
|
-
}
|
|
123
|
-
if (args.options.channelId && !validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
124
|
-
return `${args.options.channelId} is not a valid Teams channel id`;
|
|
125
|
-
}
|
|
126
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
127
|
-
return `${args.options.tabId} is not a valid GUID`;
|
|
128
|
-
}
|
|
129
|
-
return true;
|
|
130
|
-
});
|
|
131
|
-
}, _TeamsTabGetCommand_initOptionSets = function _TeamsTabGetCommand_initOptionSets() {
|
|
132
|
-
this.optionSets.push({ options: ['teamId', 'teamName'] }, { options: ['channelId', 'channelName'] }, { options: ['id', 'name'] });
|
|
133
|
-
};
|
|
134
133
|
export default new TeamsTabGetCommand();
|
|
135
134
|
//# sourceMappingURL=tab-get.js.map
|