@pnp/cli-microsoft365 12.1.0-beta.0c2915d → 12.1.0-beta.81e442d
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/cli/cli.js +12 -7
- package/dist/m365/entra/commands/app/app-add.js +106 -150
- package/dist/m365/entra/commands/app/app-get.js +22 -38
- package/dist/m365/entra/commands/app/app-list.js +10 -22
- package/dist/m365/entra/commands/app/app-permission-add.js +36 -50
- package/dist/m365/entra/commands/app/app-permission-list.js +29 -48
- package/dist/m365/entra/commands/app/app-permission-remove.js +44 -82
- package/dist/m365/entra/commands/app/app-remove.js +21 -38
- package/dist/m365/entra/commands/app/app-role-add.js +32 -46
- package/dist/m365/entra/commands/app/app-role-list.js +20 -25
- package/dist/m365/entra/commands/app/app-role-remove.js +33 -41
- package/dist/m365/entra/commands/app/app-set.js +46 -69
- package/dist/m365/spfx/commands/package/package-generate.js +30 -51
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +27 -62
- package/dist/m365/spfx/commands/project/project-doctor.js +20 -51
- package/dist/m365/spfx/commands/project/project-externalize.js +16 -26
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +28 -65
- package/dist/m365/spfx/commands/project/project-permissions-grant.js +4 -2
- package/dist/m365/spfx/commands/project/project-rename.js +17 -29
- package/dist/m365/spfx/commands/project/project-upgrade.js +0 -3
- package/dist/m365/spfx/commands/spfx-doctor.js +23 -47
- package/dist/m365/spo/commands/page/page-add.js +31 -68
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +74 -101
- package/dist/m365/spo/commands/page/page-column-get.js +15 -32
- package/dist/m365/spo/commands/page/page-column-list.js +14 -27
- package/dist/m365/spo/commands/page/page-control-get.js +18 -27
- package/dist/m365/spo/commands/page/page-control-list.js +13 -20
- package/dist/m365/spo/commands/page/page-control-remove.js +1 -1
- package/dist/m365/spo/commands/page/page-control-set.js +51 -61
- package/dist/m365/spo/commands/page/page-copy.js +15 -31
- package/dist/m365/spo/commands/page/page-header-set.js +25 -89
- package/dist/m365/spo/commands/page/page-list.js +12 -18
- package/dist/m365/spo/commands/page/page-remove.js +16 -39
- package/dist/m365/spo/commands/page/page-section-add.js +108 -173
- package/dist/m365/spo/commands/page/page-section-get.js +17 -27
- package/dist/m365/spo/commands/page/page-section-list.js +13 -20
- package/dist/m365/spo/commands/page/page-section-remove.js +4 -1
- package/dist/m365/spo/commands/page/page-set.js +50 -100
- package/dist/m365/spo/commands/page/page-template-list.js +12 -18
- package/dist/m365/spo/commands/page/page-text-add.js +23 -45
- package/dist/m365/viva/commands/connections/connections-app-create.js +36 -42
- package/dist/m365/viva/commands/engage/engage-community-add.js +75 -71
- package/dist/m365/viva/commands/engage/engage-community-get.js +8 -16
- package/dist/m365/viva/commands/engage/engage-community-list.js +5 -0
- package/dist/m365/viva/commands/engage/engage-community-remove.js +28 -48
- package/dist/m365/viva/commands/engage/engage-community-set.js +43 -66
- package/dist/m365/viva/commands/engage/engage-community-user-add.js +7 -12
- package/dist/m365/viva/commands/engage/engage-community-user-list.js +1 -1
- package/dist/m365/viva/commands/engage/engage-community-user-remove.js +4 -2
- package/dist/m365/viva/commands/engage/engage-message-add.js +22 -52
- package/dist/m365/viva/commands/engage/engage-message-get.js +8 -23
- package/dist/m365/viva/commands/engage/engage-message-like-set.js +10 -39
- package/dist/m365/viva/commands/engage/engage-message-list.js +22 -66
- package/dist/m365/viva/commands/engage/engage-message-remove.js +9 -32
- package/dist/m365/viva/commands/engage/engage-network-list.js +8 -22
- package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-role-list.js +5 -0
- package/dist/m365/viva/commands/engage/engage-role-member-add.js +3 -5
- package/dist/m365/viva/commands/engage/engage-role-member-list.js +1 -1
- package/dist/m365/viva/commands/engage/engage-role-member-remove.js +4 -2
- package/dist/m365/viva/commands/engage/engage-search.js +16 -65
- package/dist/m365/viva/commands/engage/engage-user-get.js +15 -33
- package/dist/m365/viva/commands/engage/engage-user-list.js +22 -57
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-lock.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-unlock.mdx +21 -0
- package/docs/docs/cmd/spo/page/page-text-add.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-community-add.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-get.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-remove.mdx +21 -0
- package/docs/docs/cmd/viva/engage/engage-community-set.mdx +19 -0
- package/package.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
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 _VivaEngageMessageRemoveCommand_instances, _VivaEngageMessageRemoveCommand_initTelemetry, _VivaEngageMessageRemoveCommand_initOptions, _VivaEngageMessageRemoveCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
id: z.coerce.number(),
|
|
10
|
+
force: z.boolean().optional().alias('f')
|
|
11
|
+
});
|
|
11
12
|
class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.ENGAGE_MESSAGE_REMOVE;
|
|
@@ -15,12 +16,8 @@ class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
|
|
|
15
16
|
get description() {
|
|
16
17
|
return 'Removes a Viva Engage message';
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_VivaEngageMessageRemoveCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _VivaEngageMessageRemoveCommand_instances, "m", _VivaEngageMessageRemoveCommand_initTelemetry).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _VivaEngageMessageRemoveCommand_instances, "m", _VivaEngageMessageRemoveCommand_initOptions).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _VivaEngageMessageRemoveCommand_instances, "m", _VivaEngageMessageRemoveCommand_initValidators).call(this);
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
24
21
|
}
|
|
25
22
|
async commandAction(logger, args) {
|
|
26
23
|
if (args.options.force) {
|
|
@@ -50,25 +47,5 @@ class VivaEngageMessageRemoveCommand extends VivaEngageCommand {
|
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
|
-
_VivaEngageMessageRemoveCommand_instances = new WeakSet(), _VivaEngageMessageRemoveCommand_initTelemetry = function _VivaEngageMessageRemoveCommand_initTelemetry() {
|
|
54
|
-
this.telemetry.push((args) => {
|
|
55
|
-
Object.assign(this.telemetryProperties, {
|
|
56
|
-
force: (!(!args.options.force)).toString()
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}, _VivaEngageMessageRemoveCommand_initOptions = function _VivaEngageMessageRemoveCommand_initOptions() {
|
|
60
|
-
this.options.unshift({
|
|
61
|
-
option: '--id <id>'
|
|
62
|
-
}, {
|
|
63
|
-
option: '-f, --force'
|
|
64
|
-
});
|
|
65
|
-
}, _VivaEngageMessageRemoveCommand_initValidators = function _VivaEngageMessageRemoveCommand_initValidators() {
|
|
66
|
-
this.validators.push(async (args) => {
|
|
67
|
-
if (typeof args.options.id !== 'number') {
|
|
68
|
-
return `${args.options.id} is not a number`;
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
50
|
export default new VivaEngageMessageRemoveCommand();
|
|
74
51
|
//# sourceMappingURL=engage-message-remove.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
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 _VivaEngageNetworkListCommand_instances, _VivaEngageNetworkListCommand_initTelemetry, _VivaEngageNetworkListCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
withSuspended: z.boolean().optional()
|
|
9
|
+
});
|
|
10
10
|
class VivaEngageNetworkListCommand extends VivaEngageCommand {
|
|
11
11
|
get name() {
|
|
12
12
|
return commands.ENGAGE_NETWORK_LIST;
|
|
@@ -17,11 +17,8 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
|
|
|
17
17
|
defaultProperties() {
|
|
18
18
|
return ['id', 'name', 'email', 'community', 'permalink', 'web_url'];
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_VivaEngageNetworkListCommand_instances.add(this);
|
|
23
|
-
__classPrivateFieldGet(this, _VivaEngageNetworkListCommand_instances, "m", _VivaEngageNetworkListCommand_initTelemetry).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _VivaEngageNetworkListCommand_instances, "m", _VivaEngageNetworkListCommand_initOptions).call(this);
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
25
22
|
}
|
|
26
23
|
async commandAction(logger, args) {
|
|
27
24
|
const requestOptions = {
|
|
@@ -44,16 +41,5 @@ class VivaEngageNetworkListCommand extends VivaEngageCommand {
|
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
43
|
}
|
|
47
|
-
_VivaEngageNetworkListCommand_instances = new WeakSet(), _VivaEngageNetworkListCommand_initTelemetry = function _VivaEngageNetworkListCommand_initTelemetry() {
|
|
48
|
-
this.telemetry.push((args) => {
|
|
49
|
-
Object.assign(this.telemetryProperties, {
|
|
50
|
-
withSuspended: args.options.withSuspended
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}, _VivaEngageNetworkListCommand_initOptions = function _VivaEngageNetworkListCommand_initOptions() {
|
|
54
|
-
this.options.unshift({
|
|
55
|
-
option: '--withSuspended'
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
44
|
export default new VivaEngageNetworkListCommand();
|
|
59
45
|
//# sourceMappingURL=engage-network-list.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
1
|
+
import PeriodBasedReport, { periodBasedReportOptions } from '../../../base/PeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = periodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportActivityCountsCommand extends PeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_ACTIVITYCOUNTS;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
1
|
+
import PeriodBasedReport, { periodBasedReportOptions } from '../../../base/PeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = periodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportActivityUserCountsCommand extends PeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_ACTIVITYUSERCOUNTS;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
|
|
1
|
+
import DateAndPeriodBasedReport, { dateAndPeriodBasedReportOptions } from '../../../base/DateAndPeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = dateAndPeriodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportActivityUserDetailCommand extends DateAndPeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_ACTIVITYUSERDETAIL;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
1
|
+
import PeriodBasedReport, { periodBasedReportOptions } from '../../../base/PeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = periodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportDeviceUsageDistributionUserCountsCommand extends PeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_DEVICEUSAGEDISTRIBUTIONUSERCOUNTS;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
1
|
+
import PeriodBasedReport, { periodBasedReportOptions } from '../../../base/PeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = periodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportDeviceUsageUserCountsCommand extends PeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_DEVICEUSAGEUSERCOUNTS;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
|
|
1
|
+
import DateAndPeriodBasedReport, { dateAndPeriodBasedReportOptions } from '../../../base/DateAndPeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = dateAndPeriodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportDeviceUsageUserDetailCommand extends DateAndPeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_DEVICEUSAGEUSERDETAIL;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
1
|
+
import PeriodBasedReport, { periodBasedReportOptions } from '../../../base/PeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = periodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportGroupsActivityCountsCommand extends PeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_GROUPSACTIVITYCOUNTS;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
|
|
1
|
+
import DateAndPeriodBasedReport, { dateAndPeriodBasedReportOptions } from '../../../base/DateAndPeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = dateAndPeriodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportGroupsActivityDetailCommand extends DateAndPeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_GROUPSACTIVITYDETAIL;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
|
|
1
|
+
import PeriodBasedReport, { periodBasedReportOptions } from '../../../base/PeriodBasedReport.js';
|
|
2
2
|
import commands from '../../commands.js';
|
|
3
|
+
export const options = periodBasedReportOptions;
|
|
3
4
|
class VivaEngageReportGroupsActivityGroupCountsCommand extends PeriodBasedReport {
|
|
4
5
|
get name() {
|
|
5
6
|
return commands.ENGAGE_REPORT_GROUPSACTIVITYGROUPCOUNTS;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
2
|
import { odata } from '../../../../utils/odata.js';
|
|
2
3
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = globalOptionsZod.strict();
|
|
4
6
|
class VivaEngageRoleListCommand extends GraphCommand {
|
|
5
7
|
get name() {
|
|
6
8
|
return commands.ENGAGE_ROLE_LIST;
|
|
@@ -11,6 +13,9 @@ class VivaEngageRoleListCommand extends GraphCommand {
|
|
|
11
13
|
defaultProperties() {
|
|
12
14
|
return ['id', 'displayName'];
|
|
13
15
|
}
|
|
16
|
+
get schema() {
|
|
17
|
+
return options;
|
|
18
|
+
}
|
|
14
19
|
async commandAction(logger) {
|
|
15
20
|
if (this.verbose) {
|
|
16
21
|
await logger.logToStderr('Getting all Viva Engage roles...');
|
|
@@ -8,13 +8,11 @@ import request from '../../../../request.js';
|
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
export const options = z.strictObject({
|
|
10
10
|
...globalOptionsZod.shape,
|
|
11
|
-
roleId: z.
|
|
12
|
-
error: e => `'${e.input}' is not a valid GUID.`
|
|
13
|
-
}),
|
|
11
|
+
roleId: z.guid().optional(),
|
|
14
12
|
roleName: z.string().optional(),
|
|
15
|
-
userId: z.
|
|
13
|
+
userId: z.string().refine(id => validation.isValidGuid(id), {
|
|
16
14
|
error: e => `'${e.input}' is not a valid GUID.`
|
|
17
|
-
}),
|
|
15
|
+
}).optional(),
|
|
18
16
|
userName: z.string().refine(upn => validation.isValidUserPrincipalName(upn), {
|
|
19
17
|
error: e => `'${e.input}' is not a valid UPN.`
|
|
20
18
|
}).optional()
|
|
@@ -6,7 +6,7 @@ import commands from '../../commands.js';
|
|
|
6
6
|
import { vivaEngage } from '../../../../utils/vivaEngage.js';
|
|
7
7
|
export const options = z.strictObject({
|
|
8
8
|
...globalOptionsZod.shape,
|
|
9
|
-
roleId: z.
|
|
9
|
+
roleId: z.guid().optional().alias('i'),
|
|
10
10
|
roleName: z.string().optional().alias('n')
|
|
11
11
|
});
|
|
12
12
|
class VivaEngageRoleMemberListCommand extends GraphCommand {
|
|
@@ -9,9 +9,11 @@ import request from '../../../../request.js';
|
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
export const options = z.strictObject({
|
|
11
11
|
...globalOptionsZod.shape,
|
|
12
|
-
roleId: z.
|
|
12
|
+
roleId: z.guid().optional(),
|
|
13
13
|
roleName: z.string().optional(),
|
|
14
|
-
userId: z.
|
|
14
|
+
userId: z.string().refine(id => validation.isValidGuid(id), {
|
|
15
|
+
error: e => `'${e.input}' is not a valid GUID.`
|
|
16
|
+
}).optional(),
|
|
15
17
|
userName: z.string().refine(upn => validation.isValidUserPrincipalName(upn), {
|
|
16
18
|
error: e => `'${e.input}' is not a valid UPN.`
|
|
17
19
|
}).optional(),
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
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 _VivaEngageSearchCommand_instances, _a, _VivaEngageSearchCommand_initTelemetry, _VivaEngageSearchCommand_initOptions, _VivaEngageSearchCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
6
|
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
queryText: z.string(),
|
|
11
|
+
show: z.enum(['summary', 'messages', 'users', 'topics', 'groups']).optional(),
|
|
12
|
+
limit: z.coerce.number().optional()
|
|
13
|
+
});
|
|
12
14
|
class VivaEngageSearchCommand extends VivaEngageCommand {
|
|
13
15
|
get name() {
|
|
14
16
|
return commands.ENGAGE_SEARCH;
|
|
@@ -16,22 +18,14 @@ class VivaEngageSearchCommand extends VivaEngageCommand {
|
|
|
16
18
|
get description() {
|
|
17
19
|
return 'Returns a list of messages, users, topics and groups that match the specified query.';
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
this.messages = [];
|
|
29
|
-
this.groups = [];
|
|
30
|
-
this.topics = [];
|
|
31
|
-
this.users = [];
|
|
32
|
-
__classPrivateFieldGet(this, _VivaEngageSearchCommand_instances, "m", _VivaEngageSearchCommand_initTelemetry).call(this);
|
|
33
|
-
__classPrivateFieldGet(this, _VivaEngageSearchCommand_instances, "m", _VivaEngageSearchCommand_initOptions).call(this);
|
|
34
|
-
__classPrivateFieldGet(this, _VivaEngageSearchCommand_instances, "m", _VivaEngageSearchCommand_initValidators).call(this);
|
|
21
|
+
get schema() {
|
|
22
|
+
return options;
|
|
23
|
+
}
|
|
24
|
+
getRefinedSchema(schema) {
|
|
25
|
+
return schema
|
|
26
|
+
.refine(opts => opts.output !== 'json' || !opts.show, {
|
|
27
|
+
message: `show can't be used when --output set to json`
|
|
28
|
+
});
|
|
35
29
|
}
|
|
36
30
|
async getAllItems(logger, args, page) {
|
|
37
31
|
const endpoint = `${this.resource}/v1/search.json?search=${formatting.encodeQueryParameter(args.options.queryText)}&page=${page}`;
|
|
@@ -169,48 +163,5 @@ class VivaEngageSearchCommand extends VivaEngageCommand {
|
|
|
169
163
|
}
|
|
170
164
|
}
|
|
171
165
|
}
|
|
172
|
-
_a = VivaEngageSearchCommand, _VivaEngageSearchCommand_instances = new WeakSet(), _VivaEngageSearchCommand_initTelemetry = function _VivaEngageSearchCommand_initTelemetry() {
|
|
173
|
-
this.telemetry.push((args) => {
|
|
174
|
-
Object.assign(this.telemetryProperties, {
|
|
175
|
-
show: typeof args.options.show !== 'undefined',
|
|
176
|
-
limit: typeof args.options.limit !== 'undefined'
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
}, _VivaEngageSearchCommand_initOptions = function _VivaEngageSearchCommand_initOptions() {
|
|
180
|
-
this.options.unshift({
|
|
181
|
-
option: '--queryText <queryText>'
|
|
182
|
-
}, {
|
|
183
|
-
option: '--show [show]',
|
|
184
|
-
autocomplete: _a.showOptions
|
|
185
|
-
}, {
|
|
186
|
-
option: '--limit [limit]'
|
|
187
|
-
});
|
|
188
|
-
}, _VivaEngageSearchCommand_initValidators = function _VivaEngageSearchCommand_initValidators() {
|
|
189
|
-
this.validators.push(async (args) => {
|
|
190
|
-
if (args.options.queryText && typeof args.options.queryText !== 'string') {
|
|
191
|
-
return `${args.options.queryText} is not a string`;
|
|
192
|
-
}
|
|
193
|
-
if (args.options.limit && typeof args.options.limit !== 'number') {
|
|
194
|
-
return `${args.options.limit} is not a number`;
|
|
195
|
-
}
|
|
196
|
-
if (args.options.output !== 'json') {
|
|
197
|
-
if (typeof args.options.show !== 'undefined') {
|
|
198
|
-
const scope = args.options.show.toString().toLowerCase();
|
|
199
|
-
if (_a.showOptions.indexOf(scope) < 0) {
|
|
200
|
-
return `${scope} is not a valid value for show. Allowed values are ${_a.showOptions.join(', ')}`;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
if (typeof args.options.show !== 'undefined') {
|
|
206
|
-
return `${args.options.show} can't be used when --output set to json`;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
return true;
|
|
210
|
-
});
|
|
211
|
-
};
|
|
212
|
-
VivaEngageSearchCommand.showOptions = [
|
|
213
|
-
'summary', 'messages', 'users', 'topics', 'groups'
|
|
214
|
-
];
|
|
215
166
|
export default new VivaEngageSearchCommand();
|
|
216
167
|
//# sourceMappingURL=engage-search.js.map
|
|
@@ -1,13 +1,14 @@
|
|
|
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 _VivaEngageUserGetCommand_instances, _VivaEngageUserGetCommand_initTelemetry, _VivaEngageUserGetCommand_initOptions, _VivaEngageUserGetCommand_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 VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
id: z.coerce.number().optional().alias('i'),
|
|
10
|
+
email: z.string().optional()
|
|
11
|
+
});
|
|
11
12
|
class VivaEngageUserGetCommand extends VivaEngageCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.ENGAGE_USER_GET;
|
|
@@ -15,12 +16,14 @@ class VivaEngageUserGetCommand extends VivaEngageCommand {
|
|
|
15
16
|
get description() {
|
|
16
17
|
return 'Retrieves the current user or searches for a user by ID or e-mail';
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
21
|
+
}
|
|
22
|
+
getRefinedSchema(schema) {
|
|
23
|
+
return schema
|
|
24
|
+
.refine(opts => !(opts.id !== undefined && opts.email !== undefined), {
|
|
25
|
+
message: 'You are only allowed to search by ID or e-mail but not both'
|
|
26
|
+
});
|
|
24
27
|
}
|
|
25
28
|
async commandAction(logger, args) {
|
|
26
29
|
let endPoint = `${this.resource}/v1/users/current.json`;
|
|
@@ -47,26 +50,5 @@ class VivaEngageUserGetCommand extends VivaEngageCommand {
|
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
|
-
_VivaEngageUserGetCommand_instances = new WeakSet(), _VivaEngageUserGetCommand_initTelemetry = function _VivaEngageUserGetCommand_initTelemetry() {
|
|
51
|
-
this.telemetry.push((args) => {
|
|
52
|
-
Object.assign(this.telemetryProperties, {
|
|
53
|
-
userId: args.options.id !== undefined,
|
|
54
|
-
email: args.options.email !== undefined
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}, _VivaEngageUserGetCommand_initOptions = function _VivaEngageUserGetCommand_initOptions() {
|
|
58
|
-
this.options.unshift({
|
|
59
|
-
option: '-i, --id [id]'
|
|
60
|
-
}, {
|
|
61
|
-
option: '--email [email]'
|
|
62
|
-
});
|
|
63
|
-
}, _VivaEngageUserGetCommand_initValidators = function _VivaEngageUserGetCommand_initValidators() {
|
|
64
|
-
this.validators.push(async (args) => {
|
|
65
|
-
if (args.options.id !== undefined && args.options.email !== undefined) {
|
|
66
|
-
return `You are only allowed to search by ID or e-mail but not both`;
|
|
67
|
-
}
|
|
68
|
-
return true;
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
53
|
export default new VivaEngageUserGetCommand();
|
|
72
54
|
//# sourceMappingURL=engage-user-get.js.map
|
|
@@ -1,12 +1,16 @@
|
|
|
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 _VivaEngageUserListCommand_instances, _VivaEngageUserListCommand_initTelemetry, _VivaEngageUserListCommand_initOptions, _VivaEngageUserListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
groupId: z.coerce.number().optional().alias('g'),
|
|
9
|
+
letter: z.string().optional().alias('l'),
|
|
10
|
+
reverse: z.boolean().optional(),
|
|
11
|
+
limit: z.coerce.number().optional(),
|
|
12
|
+
sortBy: z.enum(['messages', 'followers']).optional()
|
|
13
|
+
});
|
|
10
14
|
class VivaEngageUserListCommand extends VivaEngageCommand {
|
|
11
15
|
get name() {
|
|
12
16
|
return commands.ENGAGE_USER_LIST;
|
|
@@ -17,13 +21,17 @@ class VivaEngageUserListCommand extends VivaEngageCommand {
|
|
|
17
21
|
defaultProperties() {
|
|
18
22
|
return ['id', 'full_name', 'email'];
|
|
19
23
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
get schema() {
|
|
25
|
+
return options;
|
|
26
|
+
}
|
|
27
|
+
getRefinedSchema(schema) {
|
|
28
|
+
return schema
|
|
29
|
+
.refine(opts => !opts.letter || /^(?!\d)[a-zA-Z]+$/i.test(opts.letter), {
|
|
30
|
+
message: `Value of 'letter' is invalid. Only characters within the ranges [A - Z], [a - z] are allowed.`
|
|
31
|
+
})
|
|
32
|
+
.refine(opts => !opts.letter || opts.letter.length === 1, {
|
|
33
|
+
message: `Only one char as value of 'letter' accepted.`
|
|
34
|
+
});
|
|
27
35
|
}
|
|
28
36
|
getAllItems(logger, args, page) {
|
|
29
37
|
return new Promise((resolve, reject) => {
|
|
@@ -35,7 +43,7 @@ class VivaEngageUserListCommand extends VivaEngageCommand {
|
|
|
35
43
|
endPoint = `${this.resource}/v1/users/in_group/${args.options.groupId}.json`;
|
|
36
44
|
}
|
|
37
45
|
endPoint += `?page=${page}`;
|
|
38
|
-
if (args.options.reverse
|
|
46
|
+
if (args.options.reverse) {
|
|
39
47
|
endPoint += `&reverse=true`;
|
|
40
48
|
}
|
|
41
49
|
if (args.options.sortBy !== undefined) {
|
|
@@ -98,48 +106,5 @@ class VivaEngageUserListCommand extends VivaEngageCommand {
|
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
108
|
}
|
|
101
|
-
_VivaEngageUserListCommand_instances = new WeakSet(), _VivaEngageUserListCommand_initTelemetry = function _VivaEngageUserListCommand_initTelemetry() {
|
|
102
|
-
this.telemetry.push((args) => {
|
|
103
|
-
Object.assign(this.telemetryProperties, {
|
|
104
|
-
letter: args.options.letter !== undefined,
|
|
105
|
-
sortBy: args.options.sortBy !== undefined,
|
|
106
|
-
reverse: args.options.reverse !== undefined,
|
|
107
|
-
limit: args.options.limit !== undefined,
|
|
108
|
-
groupId: args.options.groupId !== undefined
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
}, _VivaEngageUserListCommand_initOptions = function _VivaEngageUserListCommand_initOptions() {
|
|
112
|
-
this.options.unshift({
|
|
113
|
-
option: '-g, --groupId [groupId]'
|
|
114
|
-
}, {
|
|
115
|
-
option: '-l, --letter [letter]'
|
|
116
|
-
}, {
|
|
117
|
-
option: '--reverse'
|
|
118
|
-
}, {
|
|
119
|
-
option: '--limit [limit]'
|
|
120
|
-
}, {
|
|
121
|
-
option: '--sortBy [sortBy]',
|
|
122
|
-
autocomplete: ['messages', 'followers']
|
|
123
|
-
});
|
|
124
|
-
}, _VivaEngageUserListCommand_initValidators = function _VivaEngageUserListCommand_initValidators() {
|
|
125
|
-
this.validators.push(async (args) => {
|
|
126
|
-
if (args.options.groupId && typeof args.options.groupId !== 'number') {
|
|
127
|
-
return `${args.options.groupId} is not a number`;
|
|
128
|
-
}
|
|
129
|
-
if (args.options.limit && typeof args.options.limit !== 'number') {
|
|
130
|
-
return `${args.options.limit} is not a number`;
|
|
131
|
-
}
|
|
132
|
-
if (args.options.sortBy && args.options.sortBy !== 'messages' && args.options.sortBy !== 'followers') {
|
|
133
|
-
return `sortBy accepts only the values "messages" or "followers"`;
|
|
134
|
-
}
|
|
135
|
-
if (args.options.letter && !/^(?!\d)[a-zA-Z]+$/i.test(args.options.letter)) {
|
|
136
|
-
return `Value of 'letter' is invalid. Only characters within the ranges [A - Z], [a - z] are allowed.`;
|
|
137
|
-
}
|
|
138
|
-
if (args.options.letter && args.options.letter.length !== 1) {
|
|
139
|
-
return `Only one char as value of 'letter' accepted.`;
|
|
140
|
-
}
|
|
141
|
-
return true;
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
109
|
export default new VivaEngageUserListCommand();
|
|
145
110
|
//# sourceMappingURL=engage-user-list.js.map
|
|
@@ -36,6 +36,25 @@ m365 spo listitem record declare [options]
|
|
|
36
36
|
|
|
37
37
|
<Global />
|
|
38
38
|
|
|
39
|
+
## Permissions
|
|
40
|
+
|
|
41
|
+
<Tabs>
|
|
42
|
+
<TabItem value="Delegated">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|------------|----------------------|
|
|
46
|
+
| SharePoint | AllSites.FullControl |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
<TabItem value="Application">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|------------|-----------------------|
|
|
53
|
+
| SharePoint | Sites.FullControl.All |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
</Tabs>
|
|
57
|
+
|
|
39
58
|
## Examples
|
|
40
59
|
|
|
41
60
|
Declare a document with id _1_ as a record in list with title _Demo List_ located in site _https://contoso.sharepoint.com/sites/project-x_
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo listitem record lock
|
|
4
6
|
|
|
@@ -31,6 +33,25 @@ m365 spo listitem record lock [options]
|
|
|
31
33
|
|
|
32
34
|
<Global />
|
|
33
35
|
|
|
36
|
+
## Permissions
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="Delegated">
|
|
40
|
+
|
|
41
|
+
| Resource | Permissions |
|
|
42
|
+
|------------|----------------|
|
|
43
|
+
| SharePoint | AllSites.Write |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Application">
|
|
47
|
+
|
|
48
|
+
| Resource | Permissions |
|
|
49
|
+
|------------|---------------------|
|
|
50
|
+
| SharePoint | Sites.ReadWrite.All |
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
</Tabs>
|
|
54
|
+
|
|
34
55
|
## Examples
|
|
35
56
|
|
|
36
57
|
Locks the list item record in a given site based on the list id
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo listitem record undeclare
|
|
4
6
|
|
|
@@ -31,6 +33,25 @@ m365 spo listitem record undeclare [options]
|
|
|
31
33
|
|
|
32
34
|
<Global />
|
|
33
35
|
|
|
36
|
+
## Permissions
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="Delegated">
|
|
40
|
+
|
|
41
|
+
| Resource | Permissions |
|
|
42
|
+
|------------|----------------------|
|
|
43
|
+
| SharePoint | AllSites.FullControl |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Application">
|
|
47
|
+
|
|
48
|
+
| Resource | Permissions |
|
|
49
|
+
|------------|-----------------------|
|
|
50
|
+
| SharePoint | Sites.FullControl.All |
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
</Tabs>
|
|
54
|
+
|
|
34
55
|
## Examples
|
|
35
56
|
|
|
36
57
|
Undeclare the list item as a record with ID _1_ from list with ID _0cd891ef-afce-4e55-b836-fce03286cccf_ located in site _https://contoso.sharepoint.com/sites/project-x
|