@pnp/cli-microsoft365 11.9.0-beta.8c1ee05 → 11.9.0-beta.9bd71dd
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/.devcontainer/Dockerfile +2 -2
- package/.devproxy/api-specs/sharepoint.yaml +166 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/cli/commands/app/app-reconsent.js +8 -0
- package/dist/m365/cli/commands/cli-consent.js +8 -31
- package/dist/m365/cli/commands/cli-doctor.js +6 -1
- package/dist/m365/cli/commands/cli-issue.js +8 -36
- package/dist/m365/cli/commands/completion/completion-clink-update.js +8 -0
- package/dist/m365/cli/commands/completion/completion-pwsh-setup.js +8 -16
- package/dist/m365/cli/commands/completion/completion-pwsh-update.js +8 -0
- package/dist/m365/cli/commands/completion/completion-sh-setup.js +8 -0
- package/dist/m365/cli/commands/completion/completion-sh-update.js +8 -0
- package/dist/m365/cli/commands/config/config-get.js +9 -32
- package/dist/m365/cli/commands/config/config-list.js +8 -0
- package/dist/m365/cli/commands/config/config-reset.js +9 -34
- package/dist/m365/cli/commands/config/config-set.js +86 -70
- package/dist/m365/commands/request.js +26 -60
- package/dist/m365/commands/search.js +59 -77
- package/dist/m365/commands/setup.js +16 -31
- package/dist/m365/commands/version.js +6 -0
- package/dist/m365/connection/commands/connection-remove.js +9 -29
- package/dist/m365/connection/commands/connection-use.js +8 -26
- package/dist/m365/context/commands/context-init.js +6 -0
- package/dist/m365/context/commands/option/option-set.js +9 -18
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +32 -63
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +21 -45
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +32 -53
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-remove.js +34 -74
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js +37 -57
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +23 -48
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +20 -43
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +24 -51
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +20 -43
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +20 -43
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +9 -25
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-remove.js +21 -50
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +9 -25
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +8 -24
- package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +6 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +9 -33
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +8 -24
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +19 -38
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +6 -0
- package/dist/m365/entra/commands/multitenant/multitenant-get.js +8 -1
- package/dist/m365/entra/commands/multitenant/multitenant-remove.js +8 -22
- package/dist/m365/entra/commands/multitenant/multitenant-set.js +15 -36
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +10 -31
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +8 -24
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +9 -17
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +9 -17
- package/dist/m365/entra/commands/pim/pim-role-assignment-add.js +68 -114
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +28 -55
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +30 -57
- package/dist/m365/entra/commands/pim/pim-role-assignment-remove.js +50 -90
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +36 -69
- package/dist/m365/entra/commands/policy/policy-list.js +13 -56
- package/dist/m365/entra/commands/user/user-add.js +39 -118
- package/dist/m365/entra/commands/user/user-get.js +24 -49
- package/dist/m365/entra/commands/user/user-groupmembership-list.js +25 -48
- package/dist/m365/entra/commands/user/user-guest-add.js +14 -39
- package/dist/m365/entra/commands/user/user-hibp.js +12 -34
- package/dist/m365/entra/commands/user/user-license-add.js +23 -42
- package/dist/m365/entra/commands/user/user-license-list.js +21 -42
- package/dist/m365/entra/commands/user/user-license-remove.js +25 -47
- package/dist/m365/entra/commands/user/user-list.js +12 -39
- package/dist/m365/entra/commands/user/user-password-validate.js +8 -15
- package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +8 -22
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +9 -33
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +8 -24
- package/dist/m365/entra/commands/user/user-registrationdetails-list.js +43 -113
- package/dist/m365/entra/commands/user/user-remove.js +22 -42
- package/dist/m365/entra/commands/user/user-set.js +69 -149
- package/dist/m365/entra/commands/user/user-signin-list.js +22 -51
- package/dist/m365/external/commands/connection/connection-add.js +40 -65
- package/dist/m365/external/commands/connection/connection-doctor.js +14 -30
- package/dist/m365/external/commands/connection/connection-get.js +19 -28
- package/dist/m365/external/commands/connection/connection-remove.js +20 -25
- package/dist/m365/external/commands/connection/connection-schema-add.js +53 -42
- package/dist/m365/external/commands/connection/connection-urltoitemresolver-add.js +12 -23
- package/dist/m365/external/commands/item/item-add.js +37 -60
- package/dist/m365/file/commands/convert/convert-pdf.js +18 -33
- package/dist/m365/file/commands/file-add.js +28 -34
- package/dist/m365/file/commands/file-copy.js +18 -34
- package/dist/m365/file/commands/file-list.js +18 -24
- package/dist/m365/file/commands/file-move.js +22 -35
- package/dist/m365/flow/commands/flow-disable.js +10 -26
- package/dist/m365/flow/commands/flow-enable.js +10 -26
- package/dist/m365/flow/commands/flow-export.js +45 -71
- package/dist/m365/flow/commands/flow-get.js +10 -26
- package/dist/m365/flow/commands/flow-list.js +17 -48
- package/dist/m365/flow/commands/flow-remove.js +11 -38
- package/dist/m365/flow/commands/owner/owner-ensure.js +30 -65
- package/dist/m365/flow/commands/owner/owner-list.js +10 -35
- package/dist/m365/flow/commands/owner/owner-remove.js +30 -61
- package/dist/m365/flow/commands/run/run-cancel.js +11 -37
- package/dist/m365/flow/commands/run/run-get.js +12 -43
- package/dist/m365/flow/commands/run/run-list.js +29 -61
- package/dist/m365/flow/commands/run/run-resubmit.js +11 -37
- package/dist/m365/graph/commands/changelog/changelog-list.js +68 -67
- package/dist/m365/graph/commands/schemaextension/schemaextension-add.js +25 -31
- package/dist/m365/graph/commands/schemaextension/schemaextension-get.js +8 -15
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +26 -50
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +9 -24
- package/dist/m365/graph/commands/schemaextension/schemaextension-set.js +32 -53
- package/dist/m365/graph/commands/subscription/subscription-add.js +63 -89
- package/dist/m365/outlook/commands/calendar/calendar-get.js +1 -1
- package/dist/m365/outlook/commands/calendar/calendar-list.js +64 -0
- package/dist/m365/outlook/commands/mail/mail-send.js +55 -84
- package/dist/m365/outlook/commands/message/message-get.js +27 -27
- package/dist/m365/outlook/commands/message/message-list.js +53 -80
- package/dist/m365/outlook/commands/message/message-move.js +43 -40
- package/dist/m365/outlook/commands/message/message-remove.js +17 -45
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/spe/commands/container/container-get.js +54 -26
- package/dist/m365/spe/commands/container/container-permission-list.js +43 -4
- package/dist/m365/spe/commands/container/container-set.js +77 -0
- package/dist/m365/spe/commands.js +1 -0
- package/dist/m365/spo/commands/file/file-unarchive.js +83 -0
- package/dist/m365/spo/commands/folder/folder-archive.js +89 -0
- package/dist/m365/spo/commands/list/list-sensitivitylabel-remove.js +83 -0
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/viva/commands/engage/engage-role-member-add.js +79 -0
- package/dist/m365/viva/commands.js +1 -0
- package/docs/docs/cmd/outlook/calendar/calendar-get.mdx +7 -7
- package/docs/docs/cmd/outlook/calendar/calendar-list.mdx +155 -0
- package/docs/docs/cmd/spe/container/container-get.mdx +24 -3
- package/docs/docs/cmd/spe/container/container-permission-list.mdx +24 -3
- package/docs/docs/cmd/spe/container/container-set.mdx +160 -0
- package/docs/docs/cmd/spo/app/app-add.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-deploy.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-get.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-install.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-instance-list.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-list.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-remove.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-retract.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-teamspackage-download.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-uninstall.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-upgrade.mdx +21 -0
- package/docs/docs/cmd/spo/apppage/apppage-add.mdx +19 -1
- package/docs/docs/cmd/spo/apppage/apppage-set.mdx +21 -0
- package/docs/docs/cmd/spo/commandset/commandset-add.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-get.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-list.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-remove.mdx +21 -0
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-unarchive.mdx +68 -0
- package/docs/docs/cmd/spo/folder/folder-archive.mdx +73 -0
- package/docs/docs/cmd/spo/list/list-sensitivitylabel-remove.mdx +77 -0
- package/docs/docs/cmd/viva/engage/engage-role-member-add.mdx +76 -0
- package/npm-shrinkwrap.json +280 -128
- package/package.json +18 -18
|
@@ -1,13 +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 _EntraGroupSettingAddCommand_instances, _EntraGroupSettingAddCommand_initOptions, _EntraGroupSettingAddCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
|
-
import { validation } from '../../../../utils/validation.js';
|
|
9
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.looseObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
templateId: z.uuid().alias('i')
|
|
9
|
+
});
|
|
11
10
|
class EntraGroupSettingAddCommand extends GraphCommand {
|
|
12
11
|
get name() {
|
|
13
12
|
return commands.GROUPSETTING_ADD;
|
|
@@ -15,15 +14,12 @@ class EntraGroupSettingAddCommand extends GraphCommand {
|
|
|
15
14
|
get description() {
|
|
16
15
|
return 'Creates a group setting';
|
|
17
16
|
}
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
_EntraGroupSettingAddCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _EntraGroupSettingAddCommand_instances, "m", _EntraGroupSettingAddCommand_initOptions).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraGroupSettingAddCommand_instances, "m", _EntraGroupSettingAddCommand_initValidators).call(this);
|
|
23
|
-
}
|
|
24
17
|
allowUnknownOptions() {
|
|
25
18
|
return true;
|
|
26
19
|
}
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
22
|
+
}
|
|
27
23
|
async commandAction(logger, args) {
|
|
28
24
|
if (this.verbose) {
|
|
29
25
|
await logger.logToStderr(`Retrieving group setting template with id '${args.options.templateId}'...`);
|
|
@@ -83,17 +79,5 @@ class EntraGroupSettingAddCommand extends GraphCommand {
|
|
|
83
79
|
return values;
|
|
84
80
|
}
|
|
85
81
|
}
|
|
86
|
-
_EntraGroupSettingAddCommand_instances = new WeakSet(), _EntraGroupSettingAddCommand_initOptions = function _EntraGroupSettingAddCommand_initOptions() {
|
|
87
|
-
this.options.unshift({
|
|
88
|
-
option: '-i, --templateId <templateId>'
|
|
89
|
-
});
|
|
90
|
-
}, _EntraGroupSettingAddCommand_initValidators = function _EntraGroupSettingAddCommand_initValidators() {
|
|
91
|
-
this.validators.push(async (args) => {
|
|
92
|
-
if (!validation.isValidGuid(args.options.templateId)) {
|
|
93
|
-
return `${args.options.templateId} is not a valid GUID`;
|
|
94
|
-
}
|
|
95
|
-
return true;
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
82
|
export default new EntraGroupSettingAddCommand();
|
|
99
83
|
//# sourceMappingURL=groupsetting-add.js.map
|
|
@@ -1,13 +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 _EntraGroupSettingGetCommand_instances, _EntraGroupSettingGetCommand_initOptions, _EntraGroupSettingGetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
|
-
import { validation } from '../../../../utils/validation.js';
|
|
9
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
id: z.uuid().alias('i')
|
|
9
|
+
});
|
|
11
10
|
class EntraGroupSettingGetCommand extends GraphCommand {
|
|
12
11
|
get name() {
|
|
13
12
|
return commands.GROUPSETTING_GET;
|
|
@@ -15,11 +14,8 @@ class EntraGroupSettingGetCommand extends GraphCommand {
|
|
|
15
14
|
get description() {
|
|
16
15
|
return 'Gets information about the particular group setting';
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_EntraGroupSettingGetCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _EntraGroupSettingGetCommand_instances, "m", _EntraGroupSettingGetCommand_initOptions).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraGroupSettingGetCommand_instances, "m", _EntraGroupSettingGetCommand_initValidators).call(this);
|
|
17
|
+
get schema() {
|
|
18
|
+
return options;
|
|
23
19
|
}
|
|
24
20
|
async commandAction(logger, args) {
|
|
25
21
|
try {
|
|
@@ -38,17 +34,5 @@ class EntraGroupSettingGetCommand extends GraphCommand {
|
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
}
|
|
41
|
-
_EntraGroupSettingGetCommand_instances = new WeakSet(), _EntraGroupSettingGetCommand_initOptions = function _EntraGroupSettingGetCommand_initOptions() {
|
|
42
|
-
this.options.unshift({
|
|
43
|
-
option: '-i, --id <id>'
|
|
44
|
-
});
|
|
45
|
-
}, _EntraGroupSettingGetCommand_initValidators = function _EntraGroupSettingGetCommand_initValidators() {
|
|
46
|
-
this.validators.push(async (args) => {
|
|
47
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
48
|
-
return `${args.options.id} is not a valid GUID`;
|
|
49
|
-
}
|
|
50
|
-
return true;
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
37
|
export default new EntraGroupSettingGetCommand();
|
|
54
38
|
//# sourceMappingURL=groupsetting-get.js.map
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
3
|
import { odata } from '../../../../utils/odata.js';
|
|
2
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.strictObject({ ...globalOptionsZod.shape });
|
|
4
7
|
class EntraGroupSettingListCommand extends GraphCommand {
|
|
5
8
|
get name() {
|
|
6
9
|
return commands.GROUPSETTING_LIST;
|
|
@@ -11,6 +14,9 @@ class EntraGroupSettingListCommand extends GraphCommand {
|
|
|
11
14
|
defaultProperties() {
|
|
12
15
|
return ['id', 'displayName'];
|
|
13
16
|
}
|
|
17
|
+
get schema() {
|
|
18
|
+
return options;
|
|
19
|
+
}
|
|
14
20
|
async commandAction(logger) {
|
|
15
21
|
try {
|
|
16
22
|
const groupSettings = await odata.getAllItems(`${this.resource}/v1.0/groupSettings`);
|
|
@@ -1,14 +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 _EntraGroupSettingRemoveCommand_instances, _EntraGroupSettingRemoveCommand_initTelemetry, _EntraGroupSettingRemoveCommand_initOptions, _EntraGroupSettingRemoveCommand_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
|
-
import { validation } from '../../../../utils/validation.js';
|
|
10
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
id: z.uuid().alias('i'),
|
|
10
|
+
force: z.boolean().optional().alias('f')
|
|
11
|
+
});
|
|
12
12
|
class EntraGroupSettingRemoveCommand extends GraphCommand {
|
|
13
13
|
get name() {
|
|
14
14
|
return commands.GROUPSETTING_REMOVE;
|
|
@@ -16,12 +16,8 @@ class EntraGroupSettingRemoveCommand extends GraphCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Removes the particular group setting';
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_EntraGroupSettingRemoveCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraGroupSettingRemoveCommand_instances, "m", _EntraGroupSettingRemoveCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _EntraGroupSettingRemoveCommand_instances, "m", _EntraGroupSettingRemoveCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _EntraGroupSettingRemoveCommand_instances, "m", _EntraGroupSettingRemoveCommand_initValidators).call(this);
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
25
21
|
}
|
|
26
22
|
async commandAction(logger, args) {
|
|
27
23
|
const removeGroupSetting = async () => {
|
|
@@ -52,25 +48,5 @@ class EntraGroupSettingRemoveCommand extends GraphCommand {
|
|
|
52
48
|
}
|
|
53
49
|
}
|
|
54
50
|
}
|
|
55
|
-
_EntraGroupSettingRemoveCommand_instances = new WeakSet(), _EntraGroupSettingRemoveCommand_initTelemetry = function _EntraGroupSettingRemoveCommand_initTelemetry() {
|
|
56
|
-
this.telemetry.push((args) => {
|
|
57
|
-
Object.assign(this.telemetryProperties, {
|
|
58
|
-
force: (!(!args.options.force)).toString()
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}, _EntraGroupSettingRemoveCommand_initOptions = function _EntraGroupSettingRemoveCommand_initOptions() {
|
|
62
|
-
this.options.unshift({
|
|
63
|
-
option: '-i, --id <id>'
|
|
64
|
-
}, {
|
|
65
|
-
option: '-f, --force'
|
|
66
|
-
});
|
|
67
|
-
}, _EntraGroupSettingRemoveCommand_initValidators = function _EntraGroupSettingRemoveCommand_initValidators() {
|
|
68
|
-
this.validators.push(async (args) => {
|
|
69
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
70
|
-
return `${args.options.id} is not a valid GUID`;
|
|
71
|
-
}
|
|
72
|
-
return true;
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
51
|
export default new EntraGroupSettingRemoveCommand();
|
|
76
52
|
//# sourceMappingURL=groupsetting-remove.js.map
|
|
@@ -1,13 +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 _EntraGroupSettingSetCommand_instances, _EntraGroupSettingSetCommand_initOptions, _EntraGroupSettingSetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
|
-
import { validation } from '../../../../utils/validation.js';
|
|
9
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.looseObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
id: z.uuid().alias('i')
|
|
9
|
+
});
|
|
11
10
|
class EntraGroupSettingSetCommand extends GraphCommand {
|
|
12
11
|
get name() {
|
|
13
12
|
return commands.GROUPSETTING_SET;
|
|
@@ -18,11 +17,8 @@ class EntraGroupSettingSetCommand extends GraphCommand {
|
|
|
18
17
|
allowUnknownOptions() {
|
|
19
18
|
return true;
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_EntraGroupSettingSetCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _EntraGroupSettingSetCommand_instances, "m", _EntraGroupSettingSetCommand_initOptions).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _EntraGroupSettingSetCommand_instances, "m", _EntraGroupSettingSetCommand_initValidators).call(this);
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
26
22
|
}
|
|
27
23
|
async commandAction(logger, args) {
|
|
28
24
|
if (this.verbose) {
|
|
@@ -83,17 +79,5 @@ class EntraGroupSettingSetCommand extends GraphCommand {
|
|
|
83
79
|
return values;
|
|
84
80
|
}
|
|
85
81
|
}
|
|
86
|
-
_EntraGroupSettingSetCommand_instances = new WeakSet(), _EntraGroupSettingSetCommand_initOptions = function _EntraGroupSettingSetCommand_initOptions() {
|
|
87
|
-
this.options.unshift({
|
|
88
|
-
option: '-i, --id <id>'
|
|
89
|
-
});
|
|
90
|
-
}, _EntraGroupSettingSetCommand_initValidators = function _EntraGroupSettingSetCommand_initValidators() {
|
|
91
|
-
this.validators.push(async (args) => {
|
|
92
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
93
|
-
return `${args.options.id} is not a valid GUID`;
|
|
94
|
-
}
|
|
95
|
-
return true;
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
82
|
export default new EntraGroupSettingSetCommand();
|
|
99
83
|
//# sourceMappingURL=groupsetting-set.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
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 _EntraGroupSettingTemplateGetCommand_instances, _EntraGroupSettingTemplateGetCommand_initTelemetry, _EntraGroupSettingTemplateGetCommand_initOptions, _EntraGroupSettingTemplateGetCommand_initValidators, _EntraGroupSettingTemplateGetCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
8
|
-
import { validation } from '../../../../utils/validation.js';
|
|
9
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
id: z.uuid().optional().alias('i'),
|
|
9
|
+
displayName: z.string().optional().alias('n')
|
|
10
|
+
});
|
|
11
11
|
class EntraGroupSettingTemplateGetCommand extends GraphCommand {
|
|
12
12
|
get name() {
|
|
13
13
|
return commands.GROUPSETTINGTEMPLATE_GET;
|
|
@@ -15,13 +15,18 @@ class EntraGroupSettingTemplateGetCommand extends GraphCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Gets information about the specified Entra group settings template';
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
get schema() {
|
|
19
|
+
return options;
|
|
20
|
+
}
|
|
21
|
+
getRefinedSchema(schema) {
|
|
22
|
+
return schema
|
|
23
|
+
.refine(options => [options.id, options.displayName].filter(Boolean).length === 1, {
|
|
24
|
+
error: 'Specify either id or displayName',
|
|
25
|
+
params: {
|
|
26
|
+
customCode: 'optionSet',
|
|
27
|
+
options: ['id', 'displayName']
|
|
28
|
+
}
|
|
29
|
+
});
|
|
25
30
|
}
|
|
26
31
|
async commandAction(logger, args) {
|
|
27
32
|
try {
|
|
@@ -39,29 +44,5 @@ class EntraGroupSettingTemplateGetCommand extends GraphCommand {
|
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
|
-
_EntraGroupSettingTemplateGetCommand_instances = new WeakSet(), _EntraGroupSettingTemplateGetCommand_initTelemetry = function _EntraGroupSettingTemplateGetCommand_initTelemetry() {
|
|
43
|
-
this.telemetry.push((args) => {
|
|
44
|
-
Object.assign(this.telemetryProperties, {
|
|
45
|
-
id: typeof args.options.id !== 'undefined',
|
|
46
|
-
displayName: typeof args.options.displayName !== 'undefined'
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}, _EntraGroupSettingTemplateGetCommand_initOptions = function _EntraGroupSettingTemplateGetCommand_initOptions() {
|
|
50
|
-
this.options.unshift({
|
|
51
|
-
option: '-i, --id [id]'
|
|
52
|
-
}, {
|
|
53
|
-
option: '-n, --displayName [displayName]'
|
|
54
|
-
});
|
|
55
|
-
}, _EntraGroupSettingTemplateGetCommand_initValidators = function _EntraGroupSettingTemplateGetCommand_initValidators() {
|
|
56
|
-
this.validators.push(async (args) => {
|
|
57
|
-
if (args.options.id &&
|
|
58
|
-
!validation.isValidGuid(args.options.id)) {
|
|
59
|
-
return `${args.options.id} is not a valid GUID`;
|
|
60
|
-
}
|
|
61
|
-
return true;
|
|
62
|
-
});
|
|
63
|
-
}, _EntraGroupSettingTemplateGetCommand_initOptionSets = function _EntraGroupSettingTemplateGetCommand_initOptionSets() {
|
|
64
|
-
this.optionSets.push({ options: ['id', 'displayName'] });
|
|
65
|
-
};
|
|
66
47
|
export default new EntraGroupSettingTemplateGetCommand();
|
|
67
48
|
//# sourceMappingURL=groupsettingtemplate-get.js.map
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
3
|
import { odata } from '../../../../utils/odata.js';
|
|
2
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.strictObject({ ...globalOptionsZod.shape });
|
|
4
7
|
class EntraGroupSettingTemplateListCommand extends GraphCommand {
|
|
5
8
|
get name() {
|
|
6
9
|
return commands.GROUPSETTINGTEMPLATE_LIST;
|
|
@@ -11,6 +14,9 @@ class EntraGroupSettingTemplateListCommand extends GraphCommand {
|
|
|
11
14
|
defaultProperties() {
|
|
12
15
|
return ['id', 'displayName'];
|
|
13
16
|
}
|
|
17
|
+
get schema() {
|
|
18
|
+
return options;
|
|
19
|
+
}
|
|
14
20
|
async commandAction(logger) {
|
|
15
21
|
try {
|
|
16
22
|
const templates = await odata.getAllItems(`${this.resource}/v1.0/groupSettingTemplates`);
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
2
|
import request from '../../../../request.js';
|
|
2
3
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = globalOptionsZod
|
|
6
|
+
.extend({})
|
|
7
|
+
.strict();
|
|
4
8
|
class EntraMultitenantGetCommand extends GraphCommand {
|
|
5
9
|
get name() {
|
|
6
10
|
return commands.MULTITENANT_GET;
|
|
@@ -8,7 +12,10 @@ class EntraMultitenantGetCommand extends GraphCommand {
|
|
|
8
12
|
get description() {
|
|
9
13
|
return 'Gets properties of the multitenant organization';
|
|
10
14
|
}
|
|
11
|
-
|
|
15
|
+
get schema() {
|
|
16
|
+
return options;
|
|
17
|
+
}
|
|
18
|
+
async commandAction(logger, _args) {
|
|
12
19
|
const requestOptions = {
|
|
13
20
|
url: `${this.resource}/v1.0/tenantRelationships/multiTenantOrganization`,
|
|
14
21
|
headers: {
|
|
@@ -1,14 +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 _EntraMultitenantRemoveCommand_instances, _EntraMultitenantRemoveCommand_initTelemetry, _EntraMultitenantRemoveCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
10
6
|
import { odata } from '../../../../utils/odata.js';
|
|
11
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
|
+
export const options = globalOptionsZod
|
|
9
|
+
.extend({
|
|
10
|
+
force: z.boolean().optional().alias('f')
|
|
11
|
+
}).strict();
|
|
12
12
|
class EntraMultitenantRemoveCommand extends GraphCommand {
|
|
13
13
|
get name() {
|
|
14
14
|
return commands.MULTITENANT_REMOVE;
|
|
@@ -16,11 +16,8 @@ class EntraMultitenantRemoveCommand extends GraphCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Removes a multitenant organization';
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_EntraMultitenantRemoveCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraMultitenantRemoveCommand_instances, "m", _EntraMultitenantRemoveCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _EntraMultitenantRemoveCommand_instances, "m", _EntraMultitenantRemoveCommand_initOptions).call(this);
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
24
21
|
}
|
|
25
22
|
async commandAction(logger, args) {
|
|
26
23
|
const removeMultitenantOrg = async () => {
|
|
@@ -103,16 +100,5 @@ class EntraMultitenantRemoveCommand extends GraphCommand {
|
|
|
103
100
|
await request.delete(requestOptions);
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
|
-
_EntraMultitenantRemoveCommand_instances = new WeakSet(), _EntraMultitenantRemoveCommand_initTelemetry = function _EntraMultitenantRemoveCommand_initTelemetry() {
|
|
107
|
-
this.telemetry.push((args) => {
|
|
108
|
-
Object.assign(this.telemetryProperties, {
|
|
109
|
-
force: !!args.options.force
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
}, _EntraMultitenantRemoveCommand_initOptions = function _EntraMultitenantRemoveCommand_initOptions() {
|
|
113
|
-
this.options.unshift({
|
|
114
|
-
option: '-f, --force'
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
103
|
export default new EntraMultitenantRemoveCommand();
|
|
118
104
|
//# sourceMappingURL=multitenant-remove.js.map
|
|
@@ -1,12 +1,13 @@
|
|
|
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 _EntraMultitenantSetCommand_instances, _EntraMultitenantSetCommand_initTelemetry, _EntraMultitenantSetCommand_initOptions, _EntraMultitenantSetCommand_initValidators, _EntraMultitenantSetCommand_initTypes;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = globalOptionsZod
|
|
7
|
+
.extend({
|
|
8
|
+
displayName: z.string().optional().alias('n'),
|
|
9
|
+
description: z.string().optional().alias('d')
|
|
10
|
+
}).strict();
|
|
10
11
|
class EntraMultitenantSetCommand extends GraphCommand {
|
|
11
12
|
get name() {
|
|
12
13
|
return commands.MULTITENANT_SET;
|
|
@@ -14,13 +15,14 @@ class EntraMultitenantSetCommand extends GraphCommand {
|
|
|
14
15
|
get description() {
|
|
15
16
|
return 'Updates the properties of a multitenant organization';
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
get schema() {
|
|
19
|
+
return options;
|
|
20
|
+
}
|
|
21
|
+
getRefinedSchema(schema) {
|
|
22
|
+
return schema
|
|
23
|
+
.refine(options => options.displayName || options.description, {
|
|
24
|
+
error: 'Specify either displayName or description or both'
|
|
25
|
+
});
|
|
24
26
|
}
|
|
25
27
|
async commandAction(logger, args) {
|
|
26
28
|
if (this.verbose) {
|
|
@@ -45,28 +47,5 @@ class EntraMultitenantSetCommand extends GraphCommand {
|
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
|
-
_EntraMultitenantSetCommand_instances = new WeakSet(), _EntraMultitenantSetCommand_initTelemetry = function _EntraMultitenantSetCommand_initTelemetry() {
|
|
49
|
-
this.telemetry.push((args) => {
|
|
50
|
-
Object.assign(this.telemetryProperties, {
|
|
51
|
-
displayName: typeof args.options.displayName !== 'undefined',
|
|
52
|
-
description: typeof args.options.description !== 'undefined'
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}, _EntraMultitenantSetCommand_initOptions = function _EntraMultitenantSetCommand_initOptions() {
|
|
56
|
-
this.options.unshift({
|
|
57
|
-
option: '-n, --displayName [displayName]'
|
|
58
|
-
}, {
|
|
59
|
-
option: '-d, --description [description]'
|
|
60
|
-
});
|
|
61
|
-
}, _EntraMultitenantSetCommand_initValidators = function _EntraMultitenantSetCommand_initValidators() {
|
|
62
|
-
this.validators.push(async (args) => {
|
|
63
|
-
if (!args.options.displayName && !args.options.description) {
|
|
64
|
-
return 'Specify either displayName or description or both.';
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
});
|
|
68
|
-
}, _EntraMultitenantSetCommand_initTypes = function _EntraMultitenantSetCommand_initTypes() {
|
|
69
|
-
this.types.string.push('displayName', 'description');
|
|
70
|
-
};
|
|
71
50
|
export default new EntraMultitenantSetCommand();
|
|
72
51
|
//# sourceMappingURL=multitenant-set.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 _EntraOAuth2GrantAddCommand_instances, _EntraOAuth2GrantAddCommand_initOptions, _EntraOAuth2GrantAddCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
|
-
import { validation } from '../../../../utils/validation.js';
|
|
9
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = globalOptionsZod
|
|
7
|
+
.extend({
|
|
8
|
+
clientId: z.uuid().alias('i'),
|
|
9
|
+
resourceId: z.uuid().alias('r'),
|
|
10
|
+
scope: z.string().alias('s')
|
|
11
|
+
}).strict();
|
|
11
12
|
class EntraOAuth2GrantAddCommand extends GraphCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.OAUTH2GRANT_ADD;
|
|
@@ -15,11 +16,8 @@ class EntraOAuth2GrantAddCommand extends GraphCommand {
|
|
|
15
16
|
get description() {
|
|
16
17
|
return 'Grant the specified service principal OAuth2 permissions to the specified resource';
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_EntraOAuth2GrantAddCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _EntraOAuth2GrantAddCommand_instances, "m", _EntraOAuth2GrantAddCommand_initOptions).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraOAuth2GrantAddCommand_instances, "m", _EntraOAuth2GrantAddCommand_initValidators).call(this);
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
23
21
|
}
|
|
24
22
|
async commandAction(logger, args) {
|
|
25
23
|
if (this.verbose) {
|
|
@@ -47,24 +45,5 @@ class EntraOAuth2GrantAddCommand extends GraphCommand {
|
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
|
-
_EntraOAuth2GrantAddCommand_instances = new WeakSet(), _EntraOAuth2GrantAddCommand_initOptions = function _EntraOAuth2GrantAddCommand_initOptions() {
|
|
51
|
-
this.options.unshift({
|
|
52
|
-
option: '-i, --clientId <clientId>'
|
|
53
|
-
}, {
|
|
54
|
-
option: '-r, --resourceId <resourceId>'
|
|
55
|
-
}, {
|
|
56
|
-
option: '-s, --scope <scope>'
|
|
57
|
-
});
|
|
58
|
-
}, _EntraOAuth2GrantAddCommand_initValidators = function _EntraOAuth2GrantAddCommand_initValidators() {
|
|
59
|
-
this.validators.push(async (args) => {
|
|
60
|
-
if (!validation.isValidGuid(args.options.clientId)) {
|
|
61
|
-
return `${args.options.clientId} is not a valid GUID`;
|
|
62
|
-
}
|
|
63
|
-
if (!validation.isValidGuid(args.options.resourceId)) {
|
|
64
|
-
return `${args.options.resourceId} is not a valid GUID`;
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
48
|
export default new EntraOAuth2GrantAddCommand();
|
|
70
49
|
//# sourceMappingURL=oauth2grant-add.js.map
|
|
@@ -1,14 +1,13 @@
|
|
|
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 _EntraOAuth2GrantListCommand_instances, _EntraOAuth2GrantListCommand_initOptions, _EntraOAuth2GrantListCommand_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
|
-
import { validation } from '../../../../utils/validation.js';
|
|
10
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = globalOptionsZod
|
|
8
|
+
.extend({
|
|
9
|
+
spObjectId: z.uuid().alias('i')
|
|
10
|
+
}).strict();
|
|
12
11
|
class EntraOAuth2GrantListCommand extends GraphCommand {
|
|
13
12
|
get name() {
|
|
14
13
|
return commands.OAUTH2GRANT_LIST;
|
|
@@ -19,11 +18,8 @@ class EntraOAuth2GrantListCommand extends GraphCommand {
|
|
|
19
18
|
defaultProperties() {
|
|
20
19
|
return ['objectId', 'resourceId', 'scope'];
|
|
21
20
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_EntraOAuth2GrantListCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _EntraOAuth2GrantListCommand_instances, "m", _EntraOAuth2GrantListCommand_initOptions).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _EntraOAuth2GrantListCommand_instances, "m", _EntraOAuth2GrantListCommand_initValidators).call(this);
|
|
21
|
+
get schema() {
|
|
22
|
+
return options;
|
|
27
23
|
}
|
|
28
24
|
async commandAction(logger, args) {
|
|
29
25
|
if (this.verbose) {
|
|
@@ -38,17 +34,5 @@ class EntraOAuth2GrantListCommand extends GraphCommand {
|
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
}
|
|
41
|
-
_EntraOAuth2GrantListCommand_instances = new WeakSet(), _EntraOAuth2GrantListCommand_initOptions = function _EntraOAuth2GrantListCommand_initOptions() {
|
|
42
|
-
this.options.unshift({
|
|
43
|
-
option: '-i, --spObjectId <spObjectId>'
|
|
44
|
-
});
|
|
45
|
-
}, _EntraOAuth2GrantListCommand_initValidators = function _EntraOAuth2GrantListCommand_initValidators() {
|
|
46
|
-
this.validators.push(async (args) => {
|
|
47
|
-
if (!validation.isValidGuid(args.options.spObjectId)) {
|
|
48
|
-
return `${args.options.spObjectId} is not a valid GUID`;
|
|
49
|
-
}
|
|
50
|
-
return true;
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
37
|
export default new EntraOAuth2GrantListCommand();
|
|
54
38
|
//# sourceMappingURL=oauth2grant-list.js.map
|
|
@@ -1,14 +1,15 @@
|
|
|
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 _EntraOAuth2GrantRemoveCommand_instances, _EntraOAuth2GrantRemoveCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { cli } from '../../../../cli/cli.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
6
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = globalOptionsZod
|
|
9
|
+
.extend({
|
|
10
|
+
grantId: z.string().alias('i'),
|
|
11
|
+
force: z.boolean().optional().alias('f')
|
|
12
|
+
}).strict();
|
|
12
13
|
class EntraOAuth2GrantRemoveCommand extends GraphCommand {
|
|
13
14
|
get name() {
|
|
14
15
|
return commands.OAUTH2GRANT_REMOVE;
|
|
@@ -16,10 +17,8 @@ class EntraOAuth2GrantRemoveCommand extends GraphCommand {
|
|
|
16
17
|
get description() {
|
|
17
18
|
return 'Remove specified service principal OAuth2 permissions';
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_EntraOAuth2GrantRemoveCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraOAuth2GrantRemoveCommand_instances, "m", _EntraOAuth2GrantRemoveCommand_initOptions).call(this);
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
23
22
|
}
|
|
24
23
|
async commandAction(logger, args) {
|
|
25
24
|
const removeOauth2Grant = async () => {
|
|
@@ -51,12 +50,5 @@ class EntraOAuth2GrantRemoveCommand extends GraphCommand {
|
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
_EntraOAuth2GrantRemoveCommand_instances = new WeakSet(), _EntraOAuth2GrantRemoveCommand_initOptions = function _EntraOAuth2GrantRemoveCommand_initOptions() {
|
|
55
|
-
this.options.unshift({
|
|
56
|
-
option: '-i, --grantId <grantId>'
|
|
57
|
-
}, {
|
|
58
|
-
option: '-f, --force'
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
53
|
export default new EntraOAuth2GrantRemoveCommand();
|
|
62
54
|
//# sourceMappingURL=oauth2grant-remove.js.map
|