@pnp/cli-microsoft365 12.0.0-beta.235caf5 → 12.0.0-beta.445fe0a
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/Command.js +11 -8
- package/dist/cli/cli.js +31 -18
- package/dist/config.js +1 -0
- package/dist/m365/entra/commands/agent/agent-blueprintprincipal-list.js +56 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/spe/commands/container/container-activate.js +8 -16
- package/dist/m365/spe/commands/container/container-list.js +21 -42
- package/dist/m365/spe/commands/containertype/containertype-list.js +5 -0
- package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.1.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027004_OVERRIDES_serialize_javascript.js +34 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.1.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +38 -71
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +25 -59
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +11 -34
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +25 -54
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +52 -83
- package/dist/m365/spo/commands/apppage/apppage-add.js +21 -39
- package/dist/m365/spo/commands/apppage/apppage-set.js +20 -30
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +39 -65
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +28 -56
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +40 -68
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +24 -66
- package/dist/m365/spo/commands/group/group-add.js +19 -60
- package/dist/m365/spo/commands/group/group-get.js +32 -45
- package/dist/m365/spo/commands/group/group-list.js +13 -27
- package/dist/m365/spo/commands/group/group-member-add.js +52 -84
- package/dist/m365/spo/commands/group/group-member-list.js +24 -38
- package/dist/m365/spo/commands/group/group-member-remove.js +49 -68
- package/dist/m365/spo/commands/group/group-remove.js +25 -45
- package/dist/m365/spo/commands/group/group-set.js +36 -79
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +15 -49
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +5 -0
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +9 -17
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +5 -0
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +11 -27
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +10 -18
- package/dist/m365/spo/commands/propertybag/propertybag-get.js +14 -29
- package/dist/m365/spo/commands/propertybag/propertybag-list.js +13 -27
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +15 -32
- package/dist/m365/spo/commands/propertybag/propertybag-set.js +15 -31
- package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +45 -44
- package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +14 -25
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +12 -18
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +15 -35
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-add.js +9 -17
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +5 -0
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +9 -17
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +29 -39
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +10 -23
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +5 -0
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +19 -28
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +24 -59
- package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +10 -34
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +19 -36
- package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +8 -0
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +9 -32
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +10 -31
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +8 -23
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +10 -34
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +9 -38
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +9 -29
- package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +27 -80
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +8 -23
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +8 -18
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +9 -32
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +15 -46
- package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +12 -56
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +5 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +47 -79
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +15 -53
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +25 -50
- package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +5 -1
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +41 -65
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +10 -30
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +8 -21
- package/dist/m365/spo/commands/tenant/tenant-settings-list.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +104 -386
- package/dist/m365/spo/commands/term/term-add.js +95 -110
- package/dist/m365/spo/commands/term/term-get.js +63 -75
- package/dist/m365/spo/commands/term/term-group-add.js +11 -41
- package/dist/m365/spo/commands/term/term-group-get.js +16 -47
- package/dist/m365/spo/commands/term/term-group-list.js +9 -34
- package/dist/m365/spo/commands/term/term-list.js +42 -57
- package/dist/m365/spo/commands/term/term-set-add.js +50 -71
- package/dist/m365/spo/commands/term/term-set-get.js +41 -58
- package/dist/m365/spo/commands/term/term-set-list.js +16 -47
- package/dist/m365/spo/commands/theme/theme-apply.js +27 -43
- package/dist/m365/spo/commands/theme/theme-get.js +8 -15
- package/dist/m365/spo/commands/theme/theme-list.js +5 -0
- package/dist/m365/spo/commands/theme/theme-remove.js +9 -24
- package/dist/m365/spo/commands/theme/theme-set.js +12 -34
- package/dist/m365/tenant/commands/id/id-get.js +8 -22
- package/dist/m365/tenant/commands/info/info-get.js +23 -36
- package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +67 -55
- package/dist/m365/tenant/commands/people/people-profilecardproperty-get.js +11 -24
- package/dist/m365/tenant/commands/people/people-profilecardproperty-list.js +5 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +12 -33
- package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +31 -51
- package/dist/m365/tenant/commands/people/people-pronouns-get.js +5 -0
- package/dist/m365/tenant/commands/people/profileCardProperties.js +10 -7
- package/dist/m365/tenant/commands/security/security-alerts-list.js +8 -20
- package/dist/utils/validation.js +12 -0
- package/dist/utils/zod.js +1 -0
- package/docs/docs/cmd/entra/agent/agent-blueprintprincipal-list.mdx +156 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,28 @@
|
|
|
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 _SpoGroupGetCommand_instances, _SpoGroupGetCommand_initTelemetry, _SpoGroupGetCommand_initOptions, _SpoGroupGetCommand_initValidators, _SpoGroupGetCommand_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 { validation } from '../../../../utils/validation.js';
|
|
6
|
+
import { zod } from '../../../../utils/zod.js';
|
|
10
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
8
|
import commands from '../../commands.js';
|
|
9
|
+
var AssociatedGroup;
|
|
10
|
+
(function (AssociatedGroup) {
|
|
11
|
+
AssociatedGroup["Owner"] = "Owner";
|
|
12
|
+
AssociatedGroup["Member"] = "Member";
|
|
13
|
+
AssociatedGroup["Visitor"] = "Visitor";
|
|
14
|
+
})(AssociatedGroup || (AssociatedGroup = {}));
|
|
15
|
+
export const options = z.strictObject({
|
|
16
|
+
...globalOptionsZod.shape,
|
|
17
|
+
webUrl: z.string()
|
|
18
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
19
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
20
|
+
})
|
|
21
|
+
.alias('u'),
|
|
22
|
+
id: z.coerce.number().int().positive().optional().alias('i'),
|
|
23
|
+
name: z.string().optional(),
|
|
24
|
+
associatedGroup: zod.coercedEnum(AssociatedGroup).optional()
|
|
25
|
+
});
|
|
12
26
|
class SpoGroupGetCommand extends SpoCommand {
|
|
13
27
|
get name() {
|
|
14
28
|
return commands.GROUP_GET;
|
|
@@ -16,13 +30,18 @@ class SpoGroupGetCommand extends SpoCommand {
|
|
|
16
30
|
get description() {
|
|
17
31
|
return 'Gets site group';
|
|
18
32
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
get schema() {
|
|
34
|
+
return options;
|
|
35
|
+
}
|
|
36
|
+
getRefinedSchema(schema) {
|
|
37
|
+
return schema
|
|
38
|
+
.refine(o => [o.id, o.name, o.associatedGroup].filter(x => x !== undefined).length === 1, {
|
|
39
|
+
error: `Specify either 'id', 'name', or 'associatedGroup', but not multiple.`,
|
|
40
|
+
params: {
|
|
41
|
+
customCode: 'optionSet',
|
|
42
|
+
options: ['id', 'name', 'associatedGroup']
|
|
43
|
+
}
|
|
44
|
+
});
|
|
26
45
|
}
|
|
27
46
|
async commandAction(logger, args) {
|
|
28
47
|
if (this.verbose) {
|
|
@@ -65,37 +84,5 @@ class SpoGroupGetCommand extends SpoCommand {
|
|
|
65
84
|
}
|
|
66
85
|
}
|
|
67
86
|
}
|
|
68
|
-
_SpoGroupGetCommand_instances = new WeakSet(), _SpoGroupGetCommand_initTelemetry = function _SpoGroupGetCommand_initTelemetry() {
|
|
69
|
-
this.telemetry.push((args) => {
|
|
70
|
-
Object.assign(this.telemetryProperties, {
|
|
71
|
-
id: (!(!args.options.id)).toString(),
|
|
72
|
-
name: (!(!args.options.name)).toString(),
|
|
73
|
-
associatedGroup: args.options.associatedGroup
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
}, _SpoGroupGetCommand_initOptions = function _SpoGroupGetCommand_initOptions() {
|
|
77
|
-
this.options.unshift({
|
|
78
|
-
option: '-u, --webUrl <webUrl>'
|
|
79
|
-
}, {
|
|
80
|
-
option: '-i, --id [id]'
|
|
81
|
-
}, {
|
|
82
|
-
option: '--name [name]'
|
|
83
|
-
}, {
|
|
84
|
-
option: '--associatedGroup [associatedGroup]',
|
|
85
|
-
autocomplete: ['Owner', 'Member', 'Visitor']
|
|
86
|
-
});
|
|
87
|
-
}, _SpoGroupGetCommand_initValidators = function _SpoGroupGetCommand_initValidators() {
|
|
88
|
-
this.validators.push(async (args) => {
|
|
89
|
-
if (args.options.id && isNaN(args.options.id)) {
|
|
90
|
-
return `Specified id ${args.options.id} is not a number`;
|
|
91
|
-
}
|
|
92
|
-
if (args.options.associatedGroup && ['owner', 'member', 'visitor'].indexOf(args.options.associatedGroup.toLowerCase()) === -1) {
|
|
93
|
-
return `${args.options.associatedGroup} is not a valid associatedGroup value. Allowed values are Owner|Member|Visitor.`;
|
|
94
|
-
}
|
|
95
|
-
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
96
|
-
});
|
|
97
|
-
}, _SpoGroupGetCommand_initOptionSets = function _SpoGroupGetCommand_initOptionSets() {
|
|
98
|
-
this.optionSets.push({ options: ['id', 'name', 'associatedGroup'] });
|
|
99
|
-
};
|
|
100
87
|
export default new SpoGroupGetCommand();
|
|
101
88
|
//# sourceMappingURL=group-get.js.map
|
|
@@ -1,15 +1,20 @@
|
|
|
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 _SpoGroupListCommand_instances, _SpoGroupListCommand_initTelemetry, _SpoGroupListCommand_initOptions, _SpoGroupListCommand_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 { odata } from '../../../../utils/odata.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
webUrl: z.string()
|
|
12
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
14
|
+
})
|
|
15
|
+
.alias('u'),
|
|
16
|
+
associatedGroupsOnly: z.boolean().optional()
|
|
17
|
+
});
|
|
13
18
|
class SpoGroupListCommand extends SpoCommand {
|
|
14
19
|
get name() {
|
|
15
20
|
return commands.GROUP_LIST;
|
|
@@ -20,12 +25,8 @@ class SpoGroupListCommand extends SpoCommand {
|
|
|
20
25
|
defaultProperties() {
|
|
21
26
|
return ['Id', 'Title', 'LoginName', 'IsHiddenInUI', 'PrincipalType', 'Type'];
|
|
22
27
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_SpoGroupListCommand_instances.add(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoGroupListCommand_instances, "m", _SpoGroupListCommand_initTelemetry).call(this);
|
|
27
|
-
__classPrivateFieldGet(this, _SpoGroupListCommand_instances, "m", _SpoGroupListCommand_initOptions).call(this);
|
|
28
|
-
__classPrivateFieldGet(this, _SpoGroupListCommand_instances, "m", _SpoGroupListCommand_initValidators).call(this);
|
|
28
|
+
get schema() {
|
|
29
|
+
return options;
|
|
29
30
|
}
|
|
30
31
|
async commandAction(logger, args) {
|
|
31
32
|
if (this.verbose) {
|
|
@@ -67,20 +68,5 @@ class SpoGroupListCommand extends SpoCommand {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
_SpoGroupListCommand_instances = new WeakSet(), _SpoGroupListCommand_initTelemetry = function _SpoGroupListCommand_initTelemetry() {
|
|
71
|
-
this.telemetry.push((args) => {
|
|
72
|
-
Object.assign(this.telemetryProperties, {
|
|
73
|
-
associatedGroupsOnly: (!(!args.options.associatedGroupsOnly)).toString()
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
}, _SpoGroupListCommand_initOptions = function _SpoGroupListCommand_initOptions() {
|
|
77
|
-
this.options.unshift({
|
|
78
|
-
option: '-u, --webUrl <webUrl>'
|
|
79
|
-
}, {
|
|
80
|
-
option: '--associatedGroupsOnly'
|
|
81
|
-
});
|
|
82
|
-
}, _SpoGroupListCommand_initValidators = function _SpoGroupListCommand_initValidators() {
|
|
83
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
84
|
-
};
|
|
85
71
|
export default new SpoGroupListCommand();
|
|
86
72
|
//# sourceMappingURL=group-list.js.map
|
|
@@ -1,15 +1,42 @@
|
|
|
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 _SpoGroupMemberAddCommand_instances, _SpoGroupMemberAddCommand_initTelemetry, _SpoGroupMemberAddCommand_initOptions, _SpoGroupMemberAddCommand_initValidators, _SpoGroupMemberAddCommand_initOptionSets, _SpoGroupMemberAddCommand_initTypes;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
webUrl: z.string()
|
|
12
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
14
|
+
})
|
|
15
|
+
.alias('u'),
|
|
16
|
+
groupId: z.coerce.number().int().positive().optional(),
|
|
17
|
+
groupName: z.string().optional(),
|
|
18
|
+
userNames: z.string()
|
|
19
|
+
.refine(names => validation.isValidUserPrincipalNameArray(names) === true, {
|
|
20
|
+
error: e => `Option 'userNames' contains one or more invalid UPNs: ${validation.isValidUserPrincipalNameArray(e.input)}.`
|
|
21
|
+
})
|
|
22
|
+
.optional(),
|
|
23
|
+
emails: z.string()
|
|
24
|
+
.refine(emails => validation.isValidUserPrincipalNameArray(emails) === true, {
|
|
25
|
+
error: e => `Option 'emails' contains one or more invalid UPNs: ${validation.isValidUserPrincipalNameArray(e.input)}.`
|
|
26
|
+
})
|
|
27
|
+
.optional(),
|
|
28
|
+
userIds: z.string()
|
|
29
|
+
.refine(ids => validation.isValidPositiveIntegerArray(ids) === true, {
|
|
30
|
+
error: e => `Option 'userIds' contains one or more invalid numbers: ${validation.isValidPositiveIntegerArray(e.input)}.`
|
|
31
|
+
})
|
|
32
|
+
.optional(),
|
|
33
|
+
entraGroupIds: z.string()
|
|
34
|
+
.refine(ids => validation.isValidGuidArray(ids) === true, {
|
|
35
|
+
error: e => `Option 'entraGroupIds' contains one or more invalid GUIDs: ${validation.isValidGuidArray(e.input)}.`
|
|
36
|
+
})
|
|
37
|
+
.optional(),
|
|
38
|
+
entraGroupNames: z.string().optional()
|
|
39
|
+
});
|
|
13
40
|
class SpoGroupMemberAddCommand extends SpoCommand {
|
|
14
41
|
get name() {
|
|
15
42
|
return commands.GROUP_MEMBER_ADD;
|
|
@@ -17,14 +44,25 @@ class SpoGroupMemberAddCommand extends SpoCommand {
|
|
|
17
44
|
get description() {
|
|
18
45
|
return 'Adds members to a SharePoint Group';
|
|
19
46
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
get schema() {
|
|
48
|
+
return options;
|
|
49
|
+
}
|
|
50
|
+
getRefinedSchema(schema) {
|
|
51
|
+
return schema
|
|
52
|
+
.refine(o => [o.groupId, o.groupName].filter(x => x !== undefined).length === 1, {
|
|
53
|
+
error: `Specify either 'groupId' or 'groupName', but not both.`,
|
|
54
|
+
params: {
|
|
55
|
+
customCode: 'optionSet',
|
|
56
|
+
options: ['groupId', 'groupName']
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
.refine(o => [o.userNames, o.emails, o.userIds, o.entraGroupIds, o.entraGroupNames].filter(x => x !== undefined).length === 1, {
|
|
60
|
+
error: `Specify either 'userNames', 'emails', 'userIds', 'entraGroupIds', or 'entraGroupNames', but not multiple.`,
|
|
61
|
+
params: {
|
|
62
|
+
customCode: 'optionSet',
|
|
63
|
+
options: ['userNames', 'emails', 'userIds', 'entraGroupIds', 'entraGroupNames']
|
|
64
|
+
}
|
|
65
|
+
});
|
|
28
66
|
}
|
|
29
67
|
async commandAction(logger, args) {
|
|
30
68
|
try {
|
|
@@ -112,75 +150,5 @@ class SpoGroupMemberAddCommand extends SpoCommand {
|
|
|
112
150
|
return user.LoginName;
|
|
113
151
|
}
|
|
114
152
|
}
|
|
115
|
-
_SpoGroupMemberAddCommand_instances = new WeakSet(), _SpoGroupMemberAddCommand_initTelemetry = function _SpoGroupMemberAddCommand_initTelemetry() {
|
|
116
|
-
this.telemetry.push((args) => {
|
|
117
|
-
Object.assign(this.telemetryProperties, {
|
|
118
|
-
groupId: typeof args.options.groupId !== 'undefined',
|
|
119
|
-
groupName: typeof args.options.groupName !== 'undefined',
|
|
120
|
-
userNames: typeof args.options.userNames !== 'undefined',
|
|
121
|
-
emails: typeof args.options.emails !== 'undefined',
|
|
122
|
-
userIds: typeof args.options.userIds !== 'undefined',
|
|
123
|
-
entraGroupIds: typeof args.options.entraGroupIds !== 'undefined',
|
|
124
|
-
entraGroupNames: typeof args.options.entraGroupNames !== 'undefined'
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
}, _SpoGroupMemberAddCommand_initOptions = function _SpoGroupMemberAddCommand_initOptions() {
|
|
128
|
-
this.options.unshift({
|
|
129
|
-
option: '-u, --webUrl <webUrl>'
|
|
130
|
-
}, {
|
|
131
|
-
option: '--groupId [groupId]'
|
|
132
|
-
}, {
|
|
133
|
-
option: '--groupName [groupName]'
|
|
134
|
-
}, {
|
|
135
|
-
option: '--userNames [userNames]'
|
|
136
|
-
}, {
|
|
137
|
-
option: '--emails [emails]'
|
|
138
|
-
}, {
|
|
139
|
-
option: '--userIds [userIds]'
|
|
140
|
-
}, {
|
|
141
|
-
option: '--entraGroupIds [entraGroupIds]'
|
|
142
|
-
}, {
|
|
143
|
-
option: '--entraGroupNames [entraGroupNames]'
|
|
144
|
-
});
|
|
145
|
-
}, _SpoGroupMemberAddCommand_initValidators = function _SpoGroupMemberAddCommand_initValidators() {
|
|
146
|
-
this.validators.push(async (args) => {
|
|
147
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
148
|
-
if (isValidSharePointUrl !== true) {
|
|
149
|
-
return isValidSharePointUrl;
|
|
150
|
-
}
|
|
151
|
-
if (args.options.groupId && !validation.isValidPositiveInteger(args.options.groupId)) {
|
|
152
|
-
return `Specified groupId ${args.options.groupId} is not a positive number.`;
|
|
153
|
-
}
|
|
154
|
-
if (args.options.userIds) {
|
|
155
|
-
const isValidArray = validation.isValidPositiveIntegerArray(args.options.userIds);
|
|
156
|
-
if (isValidArray !== true) {
|
|
157
|
-
return `Option 'userIds' contains one or more invalid numbers: ${isValidArray}.`;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
if (args.options.userNames) {
|
|
161
|
-
const isValidArray = validation.isValidUserPrincipalNameArray(args.options.userNames);
|
|
162
|
-
if (isValidArray !== true) {
|
|
163
|
-
return `Option 'userNames' contains one or more invalid UPNs: ${isValidArray}.`;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if (args.options.emails) {
|
|
167
|
-
const isValidArray = validation.isValidUserPrincipalNameArray(args.options.emails);
|
|
168
|
-
if (isValidArray !== true) {
|
|
169
|
-
return `Option 'emails' contains one or more invalid UPNs: ${isValidArray}.`;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (args.options.entraGroupIds) {
|
|
173
|
-
const isValidArray = validation.isValidGuidArray(args.options.entraGroupIds);
|
|
174
|
-
if (isValidArray !== true) {
|
|
175
|
-
return `Option 'entraGroupIds' contains one or more invalid GUIDs: ${isValidArray}.`;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
return true;
|
|
179
|
-
});
|
|
180
|
-
}, _SpoGroupMemberAddCommand_initOptionSets = function _SpoGroupMemberAddCommand_initOptionSets() {
|
|
181
|
-
this.optionSets.push({ options: ['groupId', 'groupName'] }, { options: ['userNames', 'emails', 'userIds', 'entraGroupIds', 'entraGroupNames'] });
|
|
182
|
-
}, _SpoGroupMemberAddCommand_initTypes = function _SpoGroupMemberAddCommand_initTypes() {
|
|
183
|
-
this.types.string.push('webUrl', 'groupName', 'userNames', 'emails', 'userIds', 'entraGroupIds', 'entraGroupNames');
|
|
184
|
-
};
|
|
185
153
|
export default new SpoGroupMemberAddCommand();
|
|
186
154
|
//# sourceMappingURL=group-member-add.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 _SpoGroupMemberListCommand_instances, _SpoGroupMemberListCommand_initTelemetry, _SpoGroupMemberListCommand_initOptions, _SpoGroupMemberListCommand_initValidators, _SpoGroupMemberListCommand_initOptionSets;
|
|
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 SpoCommand from '../../../base/SpoCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string()
|
|
11
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
13
|
+
})
|
|
14
|
+
.alias('u'),
|
|
15
|
+
groupId: z.coerce.number().int().positive().optional(),
|
|
16
|
+
groupName: z.string().optional()
|
|
17
|
+
});
|
|
12
18
|
class SpoGroupMemberListCommand extends SpoCommand {
|
|
13
19
|
get name() {
|
|
14
20
|
return commands.GROUP_MEMBER_LIST;
|
|
@@ -19,13 +25,18 @@ class SpoGroupMemberListCommand extends SpoCommand {
|
|
|
19
25
|
defaultProperties() {
|
|
20
26
|
return ['Title', 'UserPrincipalName', 'Id', 'Email'];
|
|
21
27
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
get schema() {
|
|
29
|
+
return options;
|
|
30
|
+
}
|
|
31
|
+
getRefinedSchema(schema) {
|
|
32
|
+
return schema
|
|
33
|
+
.refine(o => [o.groupId, o.groupName].filter(x => x !== undefined).length === 1, {
|
|
34
|
+
error: `Specify either 'groupId' or 'groupName', but not both.`,
|
|
35
|
+
params: {
|
|
36
|
+
customCode: 'optionSet',
|
|
37
|
+
options: ['groupId', 'groupName']
|
|
38
|
+
}
|
|
39
|
+
});
|
|
29
40
|
}
|
|
30
41
|
async commandAction(logger, args) {
|
|
31
42
|
if (this.verbose) {
|
|
@@ -43,30 +54,5 @@ class SpoGroupMemberListCommand extends SpoCommand {
|
|
|
43
54
|
}
|
|
44
55
|
}
|
|
45
56
|
}
|
|
46
|
-
_SpoGroupMemberListCommand_instances = new WeakSet(), _SpoGroupMemberListCommand_initTelemetry = function _SpoGroupMemberListCommand_initTelemetry() {
|
|
47
|
-
this.telemetry.push((args) => {
|
|
48
|
-
Object.assign(this.telemetryProperties, {
|
|
49
|
-
groupId: typeof args.options.groupId !== 'undefined',
|
|
50
|
-
groupName: typeof args.options.groupName !== 'undefined'
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}, _SpoGroupMemberListCommand_initOptions = function _SpoGroupMemberListCommand_initOptions() {
|
|
54
|
-
this.options.unshift({
|
|
55
|
-
option: '-u, --webUrl <webUrl>'
|
|
56
|
-
}, {
|
|
57
|
-
option: '--groupId [groupId]'
|
|
58
|
-
}, {
|
|
59
|
-
option: '--groupName [groupName]'
|
|
60
|
-
});
|
|
61
|
-
}, _SpoGroupMemberListCommand_initValidators = function _SpoGroupMemberListCommand_initValidators() {
|
|
62
|
-
this.validators.push(async (args) => {
|
|
63
|
-
if (args.options.groupId && isNaN(args.options.groupId)) {
|
|
64
|
-
return `Specified "groupId" ${args.options.groupId} is not valid`;
|
|
65
|
-
}
|
|
66
|
-
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
67
|
-
});
|
|
68
|
-
}, _SpoGroupMemberListCommand_initOptionSets = function _SpoGroupMemberListCommand_initOptionSets() {
|
|
69
|
-
this.optionSets.push({ options: ['groupName', 'groupId'] });
|
|
70
|
-
};
|
|
71
57
|
export default new SpoGroupMemberListCommand();
|
|
72
58
|
//# sourceMappingURL=group-member-list.js.map
|
|
@@ -1,10 +1,6 @@
|
|
|
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 _SpoGroupMemberRemoveCommand_instances, _SpoGroupMemberRemoveCommand_initTelemetry, _SpoGroupMemberRemoveCommand_initOptions, _SpoGroupMemberRemoveCommand_initValidators, _SpoGroupMemberRemoveCommand_initOptionSets;
|
|
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 { validation } from '../../../../utils/validation.js';
|
|
@@ -12,6 +8,34 @@ import entraUserGetCommand from '../../../entra/commands/user/user-get.js';
|
|
|
12
8
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
9
|
import commands from '../../commands.js';
|
|
14
10
|
import SpoGroupMemberListCommand from './group-member-list.js';
|
|
11
|
+
export const options = z.strictObject({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
webUrl: z.string()
|
|
14
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
|
+
})
|
|
17
|
+
.alias('u'),
|
|
18
|
+
groupId: z.coerce.number().int().positive().optional(),
|
|
19
|
+
groupName: z.string().optional(),
|
|
20
|
+
userName: z.string()
|
|
21
|
+
.refine(userName => validation.isValidUserPrincipalName(userName), {
|
|
22
|
+
error: e => `'${e.input}' is not a valid userName.`
|
|
23
|
+
})
|
|
24
|
+
.optional(),
|
|
25
|
+
email: z.string()
|
|
26
|
+
.refine(email => validation.isValidUserPrincipalName(email), {
|
|
27
|
+
error: e => `'${e.input}' is not a valid email.`
|
|
28
|
+
})
|
|
29
|
+
.optional(),
|
|
30
|
+
userId: z.number().optional(),
|
|
31
|
+
entraGroupId: z.string()
|
|
32
|
+
.refine(id => validation.isValidGuid(id), {
|
|
33
|
+
error: e => `'${e.input}' is not a valid GUID.`
|
|
34
|
+
})
|
|
35
|
+
.optional(),
|
|
36
|
+
entraGroupName: z.string().optional(),
|
|
37
|
+
force: z.boolean().optional().alias('f')
|
|
38
|
+
});
|
|
15
39
|
class SpoGroupMemberRemoveCommand extends SpoCommand {
|
|
16
40
|
get name() {
|
|
17
41
|
return commands.GROUP_MEMBER_REMOVE;
|
|
@@ -19,13 +43,25 @@ class SpoGroupMemberRemoveCommand extends SpoCommand {
|
|
|
19
43
|
get description() {
|
|
20
44
|
return 'Removes the specified member from a SharePoint group';
|
|
21
45
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
46
|
+
get schema() {
|
|
47
|
+
return options;
|
|
48
|
+
}
|
|
49
|
+
getRefinedSchema(schema) {
|
|
50
|
+
return schema
|
|
51
|
+
.refine(o => [o.groupId, o.groupName].filter(x => x !== undefined).length === 1, {
|
|
52
|
+
error: `Specify either 'groupId' or 'groupName', but not both.`,
|
|
53
|
+
params: {
|
|
54
|
+
customCode: 'optionSet',
|
|
55
|
+
options: ['groupId', 'groupName']
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
.refine(o => [o.userName, o.email, o.userId, o.entraGroupId, o.entraGroupName].filter(x => x !== undefined).length === 1, {
|
|
59
|
+
error: `Specify either 'userName', 'email', 'userId', 'entraGroupId', or 'entraGroupName', but not multiple.`,
|
|
60
|
+
params: {
|
|
61
|
+
customCode: 'optionSet',
|
|
62
|
+
options: ['userName', 'email', 'userId', 'entraGroupId', 'entraGroupName']
|
|
63
|
+
}
|
|
64
|
+
});
|
|
29
65
|
}
|
|
30
66
|
async getUserName(logger, args) {
|
|
31
67
|
if (args.options.userName) {
|
|
@@ -119,60 +155,5 @@ class SpoGroupMemberRemoveCommand extends SpoCommand {
|
|
|
119
155
|
return foundGroups[0].Id;
|
|
120
156
|
}
|
|
121
157
|
}
|
|
122
|
-
_SpoGroupMemberRemoveCommand_instances = new WeakSet(), _SpoGroupMemberRemoveCommand_initTelemetry = function _SpoGroupMemberRemoveCommand_initTelemetry() {
|
|
123
|
-
this.telemetry.push((args) => {
|
|
124
|
-
Object.assign(this.telemetryProperties, {
|
|
125
|
-
groupId: (!(!args.options.groupId)).toString(),
|
|
126
|
-
groupName: (!(!args.options.groupName)).toString(),
|
|
127
|
-
userName: (!(!args.options.userName)).toString(),
|
|
128
|
-
email: (!(!args.options.email)).toString(),
|
|
129
|
-
userId: (!(!args.options.userId)).toString(),
|
|
130
|
-
entraGroupId: (!(!args.options.entraGroupId)).toString(),
|
|
131
|
-
entraGroupName: (!(!args.options.entraGroupName)).toString(),
|
|
132
|
-
force: (!(!args.options.force)).toString()
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
}, _SpoGroupMemberRemoveCommand_initOptions = function _SpoGroupMemberRemoveCommand_initOptions() {
|
|
136
|
-
this.options.unshift({
|
|
137
|
-
option: '-u, --webUrl <webUrl>'
|
|
138
|
-
}, {
|
|
139
|
-
option: '--groupId [groupId]'
|
|
140
|
-
}, {
|
|
141
|
-
option: '--groupName [groupName]'
|
|
142
|
-
}, {
|
|
143
|
-
option: '--userName [userName]'
|
|
144
|
-
}, {
|
|
145
|
-
option: '--email [email]'
|
|
146
|
-
}, {
|
|
147
|
-
option: '--userId [userId]'
|
|
148
|
-
}, {
|
|
149
|
-
option: '--entraGroupId [entraGroupId]'
|
|
150
|
-
}, {
|
|
151
|
-
option: '--entraGroupName [entraGroupName]'
|
|
152
|
-
}, {
|
|
153
|
-
option: '-f, --force'
|
|
154
|
-
});
|
|
155
|
-
}, _SpoGroupMemberRemoveCommand_initValidators = function _SpoGroupMemberRemoveCommand_initValidators() {
|
|
156
|
-
this.validators.push(async (args) => {
|
|
157
|
-
if (args.options.groupId && isNaN(args.options.groupId)) {
|
|
158
|
-
return `Specified "groupId" ${args.options.groupId} is not valid`;
|
|
159
|
-
}
|
|
160
|
-
if (args.options.userId && isNaN(args.options.userId)) {
|
|
161
|
-
return `Specified "userId" ${args.options.userId} is not valid`;
|
|
162
|
-
}
|
|
163
|
-
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
164
|
-
return `${args.options.userName} is not a valid userName`;
|
|
165
|
-
}
|
|
166
|
-
if (args.options.email && !validation.isValidUserPrincipalName(args.options.email)) {
|
|
167
|
-
return `${args.options.email} is not a valid email`;
|
|
168
|
-
}
|
|
169
|
-
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
170
|
-
return `${args.options.entraGroupId} is not a valid GUID`;
|
|
171
|
-
}
|
|
172
|
-
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
173
|
-
});
|
|
174
|
-
}, _SpoGroupMemberRemoveCommand_initOptionSets = function _SpoGroupMemberRemoveCommand_initOptionSets() {
|
|
175
|
-
this.optionSets.push({ options: ['groupName', 'groupId'] }, { options: ['userName', 'email', 'userId', 'entraGroupId', 'entraGroupName'] });
|
|
176
|
-
};
|
|
177
158
|
export default new SpoGroupMemberRemoveCommand();
|
|
178
159
|
//# sourceMappingURL=group-member-remove.js.map
|
|
@@ -1,14 +1,21 @@
|
|
|
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 _SpoGroupRemoveCommand_instances, _SpoGroupRemoveCommand_initTelemetry, _SpoGroupRemoveCommand_initOptions, _SpoGroupRemoveCommand_initValidators, _SpoGroupRemoveCommand_initOptionSets;
|
|
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 { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string()
|
|
11
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
13
|
+
})
|
|
14
|
+
.alias('u'),
|
|
15
|
+
id: z.number().optional(),
|
|
16
|
+
name: z.string().optional(),
|
|
17
|
+
force: z.boolean().optional().alias('f')
|
|
18
|
+
});
|
|
12
19
|
class SpoGroupRemoveCommand extends SpoCommand {
|
|
13
20
|
get name() {
|
|
14
21
|
return commands.GROUP_REMOVE;
|
|
@@ -16,13 +23,18 @@ class SpoGroupRemoveCommand extends SpoCommand {
|
|
|
16
23
|
get description() {
|
|
17
24
|
return 'Removes group from specific web';
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
get schema() {
|
|
27
|
+
return options;
|
|
28
|
+
}
|
|
29
|
+
getRefinedSchema(schema) {
|
|
30
|
+
return schema
|
|
31
|
+
.refine(o => [o.id, o.name].filter(x => x !== undefined).length === 1, {
|
|
32
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
33
|
+
params: {
|
|
34
|
+
customCode: 'optionSet',
|
|
35
|
+
options: ['id', 'name']
|
|
36
|
+
}
|
|
37
|
+
});
|
|
26
38
|
}
|
|
27
39
|
async commandAction(logger, args) {
|
|
28
40
|
const removeGroup = async () => {
|
|
@@ -73,37 +85,5 @@ class SpoGroupRemoveCommand extends SpoCommand {
|
|
|
73
85
|
}
|
|
74
86
|
}
|
|
75
87
|
}
|
|
76
|
-
_SpoGroupRemoveCommand_instances = new WeakSet(), _SpoGroupRemoveCommand_initTelemetry = function _SpoGroupRemoveCommand_initTelemetry() {
|
|
77
|
-
this.telemetry.push((args) => {
|
|
78
|
-
Object.assign(this.telemetryProperties, {
|
|
79
|
-
id: (!(!args.options.id)).toString(),
|
|
80
|
-
name: (!(!args.options.name)).toString(),
|
|
81
|
-
force: (!(!args.options.force)).toString()
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
}, _SpoGroupRemoveCommand_initOptions = function _SpoGroupRemoveCommand_initOptions() {
|
|
85
|
-
this.options.unshift({
|
|
86
|
-
option: '-u, --webUrl <webUrl>'
|
|
87
|
-
}, {
|
|
88
|
-
option: '--id [id]'
|
|
89
|
-
}, {
|
|
90
|
-
option: '--name [name]'
|
|
91
|
-
}, {
|
|
92
|
-
option: '-f, --force'
|
|
93
|
-
});
|
|
94
|
-
}, _SpoGroupRemoveCommand_initValidators = function _SpoGroupRemoveCommand_initValidators() {
|
|
95
|
-
this.validators.push(async (args) => {
|
|
96
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
97
|
-
if (isValidSharePointUrl !== true) {
|
|
98
|
-
return isValidSharePointUrl;
|
|
99
|
-
}
|
|
100
|
-
if (args.options.id && typeof args.options.id !== 'number') {
|
|
101
|
-
return `${args.options.id} is not a number`;
|
|
102
|
-
}
|
|
103
|
-
return true;
|
|
104
|
-
});
|
|
105
|
-
}, _SpoGroupRemoveCommand_initOptionSets = function _SpoGroupRemoveCommand_initOptionSets() {
|
|
106
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
107
|
-
};
|
|
108
88
|
export default new SpoGroupRemoveCommand();
|
|
109
89
|
//# sourceMappingURL=group-remove.js.map
|