@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,12 +1,18 @@
|
|
|
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 _EntraUserGuestAddCommand_instances, _EntraUserGuestAddCommand_initTelemetry, _EntraUserGuestAddCommand_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';
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
emailAddress: z.string(),
|
|
9
|
+
displayName: z.string().optional(),
|
|
10
|
+
inviteRedirectUrl: z.string().optional(),
|
|
11
|
+
welcomeMessage: z.string().optional(),
|
|
12
|
+
messageLanguage: z.string().optional(),
|
|
13
|
+
ccRecipients: z.string().optional(),
|
|
14
|
+
sendInvitationMessage: z.boolean().optional()
|
|
15
|
+
});
|
|
10
16
|
class EntraUserGuestAddCommand extends GraphCommand {
|
|
11
17
|
get name() {
|
|
12
18
|
return commands.USER_GUEST_ADD;
|
|
@@ -14,11 +20,8 @@ class EntraUserGuestAddCommand extends GraphCommand {
|
|
|
14
20
|
get description() {
|
|
15
21
|
return 'Invite an external user to the organization';
|
|
16
22
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_EntraUserGuestAddCommand_instances.add(this);
|
|
20
|
-
__classPrivateFieldGet(this, _EntraUserGuestAddCommand_instances, "m", _EntraUserGuestAddCommand_initTelemetry).call(this);
|
|
21
|
-
__classPrivateFieldGet(this, _EntraUserGuestAddCommand_instances, "m", _EntraUserGuestAddCommand_initOptions).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
22
25
|
}
|
|
23
26
|
async commandAction(logger, args) {
|
|
24
27
|
try {
|
|
@@ -55,33 +58,5 @@ class EntraUserGuestAddCommand extends GraphCommand {
|
|
|
55
58
|
}));
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
|
-
_EntraUserGuestAddCommand_instances = new WeakSet(), _EntraUserGuestAddCommand_initTelemetry = function _EntraUserGuestAddCommand_initTelemetry() {
|
|
59
|
-
this.telemetry.push((args) => {
|
|
60
|
-
Object.assign(this.telemetryProperties, {
|
|
61
|
-
displayName: typeof args.options.displayName !== 'undefined',
|
|
62
|
-
inviteRedirectUrl: typeof args.options.inviteRedirectUrl !== 'undefined',
|
|
63
|
-
welcomeMessage: typeof args.options.welcomeMessage !== 'undefined',
|
|
64
|
-
messageLanguage: typeof args.options.messageLanguage !== 'undefined',
|
|
65
|
-
ccRecipients: typeof args.options.ccRecipients !== 'undefined',
|
|
66
|
-
sendInvitationMessage: !!args.options.sendInvitationMessage
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
}, _EntraUserGuestAddCommand_initOptions = function _EntraUserGuestAddCommand_initOptions() {
|
|
70
|
-
this.options.unshift({
|
|
71
|
-
option: '--emailAddress <emailAddress>'
|
|
72
|
-
}, {
|
|
73
|
-
option: '--displayName [displayName]'
|
|
74
|
-
}, {
|
|
75
|
-
option: '--inviteRedirectUrl [inviteRedirectUrl]'
|
|
76
|
-
}, {
|
|
77
|
-
option: '--welcomeMessage [welcomeMessage]'
|
|
78
|
-
}, {
|
|
79
|
-
option: '--messageLanguage [messageLanguage]'
|
|
80
|
-
}, {
|
|
81
|
-
option: '--ccRecipients [ccRecipients]'
|
|
82
|
-
}, {
|
|
83
|
-
option: '--sendInvitationMessage'
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
61
|
export default new EntraUserGuestAddCommand();
|
|
87
62
|
//# sourceMappingURL=user-guest-add.js.map
|
|
@@ -1,14 +1,18 @@
|
|
|
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 _EntraUserHibpCommand_instances, _EntraUserHibpCommand_initTelemetry, _EntraUserHibpCommand_initOptions, _EntraUserHibpCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import AnonymousCommand from '../../../base/AnonymousCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
userName: z.string().refine(name => validation.isValidUserPrincipalName(name), {
|
|
11
|
+
error: 'Specify valid userName.'
|
|
12
|
+
}).alias('n'),
|
|
13
|
+
apiKey: z.string(),
|
|
14
|
+
domain: z.string().optional()
|
|
15
|
+
});
|
|
12
16
|
class EntraUserHibpCommand extends AnonymousCommand {
|
|
13
17
|
get name() {
|
|
14
18
|
return commands.USER_HIBP;
|
|
@@ -16,12 +20,8 @@ class EntraUserHibpCommand extends AnonymousCommand {
|
|
|
16
20
|
get description() {
|
|
17
21
|
return 'Allows you to retrieve all accounts that have been pwned with the specified username';
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_EntraUserHibpCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraUserHibpCommand_instances, "m", _EntraUserHibpCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _EntraUserHibpCommand_instances, "m", _EntraUserHibpCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _EntraUserHibpCommand_instances, "m", _EntraUserHibpCommand_initValidators).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
25
|
}
|
|
26
26
|
async commandAction(logger, args) {
|
|
27
27
|
try {
|
|
@@ -46,27 +46,5 @@ class EntraUserHibpCommand extends AnonymousCommand {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
_EntraUserHibpCommand_instances = new WeakSet(), _EntraUserHibpCommand_initTelemetry = function _EntraUserHibpCommand_initTelemetry() {
|
|
50
|
-
this.telemetry.push((args) => {
|
|
51
|
-
Object.assign(this.telemetryProperties, {
|
|
52
|
-
domain: args.options.domain
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}, _EntraUserHibpCommand_initOptions = function _EntraUserHibpCommand_initOptions() {
|
|
56
|
-
this.options.unshift({
|
|
57
|
-
option: '-n, --userName <userName>'
|
|
58
|
-
}, {
|
|
59
|
-
option: '--apiKey, <apiKey>'
|
|
60
|
-
}, {
|
|
61
|
-
option: '--domain, [domain]'
|
|
62
|
-
});
|
|
63
|
-
}, _EntraUserHibpCommand_initValidators = function _EntraUserHibpCommand_initValidators() {
|
|
64
|
-
this.validators.push(async (args) => {
|
|
65
|
-
if (!validation.isValidUserPrincipalName(args.options.userName)) {
|
|
66
|
-
return 'Specify valid userName';
|
|
67
|
-
}
|
|
68
|
-
return true;
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
49
|
export default new EntraUserHibpCommand();
|
|
72
50
|
//# sourceMappingURL=user-hibp.js.map
|
|
@@ -1,14 +1,18 @@
|
|
|
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 _EntraUserLicenseAddCommand_instances, _EntraUserLicenseAddCommand_initTelemetry, _EntraUserLicenseAddCommand_initOptions, _EntraUserLicenseAddCommand_initValidators, _EntraUserLicenseAddCommand_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';
|
|
10
6
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
userId: z.uuid().optional(),
|
|
11
|
+
userName: z.string().optional(),
|
|
12
|
+
ids: z.string().refine(ids => !ids.split(',').some(e => !validation.isValidGuid(e)), {
|
|
13
|
+
error: e => `'${e.input}' contains one or more invalid GUIDs.`
|
|
14
|
+
})
|
|
15
|
+
});
|
|
12
16
|
class EntraUserLicenseAddCommand extends GraphCommand {
|
|
13
17
|
get name() {
|
|
14
18
|
return commands.USER_LICENSE_ADD;
|
|
@@ -16,19 +20,24 @@ class EntraUserLicenseAddCommand extends GraphCommand {
|
|
|
16
20
|
get description() {
|
|
17
21
|
return 'Assigns a license to a user';
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
|
+
}
|
|
26
|
+
getRefinedSchema(schema) {
|
|
27
|
+
return schema
|
|
28
|
+
.refine(options => [options.userId, options.userName].filter(o => o !== undefined).length === 1, {
|
|
29
|
+
error: `Specify either 'userId' or 'userName'.`,
|
|
30
|
+
params: {
|
|
31
|
+
customCode: 'optionSet',
|
|
32
|
+
options: ['userId', 'userName']
|
|
33
|
+
}
|
|
34
|
+
});
|
|
26
35
|
}
|
|
27
36
|
async commandAction(logger, args) {
|
|
28
37
|
const addLicenses = args.options.ids.split(',').map(x => { return { "disabledPlans": [], "skuId": x }; });
|
|
29
38
|
const requestBody = { "addLicenses": addLicenses, "removeLicenses": [] };
|
|
30
39
|
const requestOptions = {
|
|
31
|
-
url: `${this.resource}/v1.0/users/${formatting.encodeQueryParameter(args.options.userId
|
|
40
|
+
url: `${this.resource}/v1.0/users/${formatting.encodeQueryParameter(args.options.userId ?? args.options.userName)}/assignLicense`,
|
|
32
41
|
headers: {
|
|
33
42
|
accept: 'application/json;odata.metadata=none'
|
|
34
43
|
},
|
|
@@ -44,33 +53,5 @@ class EntraUserLicenseAddCommand extends GraphCommand {
|
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
}
|
|
47
|
-
_EntraUserLicenseAddCommand_instances = new WeakSet(), _EntraUserLicenseAddCommand_initTelemetry = function _EntraUserLicenseAddCommand_initTelemetry() {
|
|
48
|
-
this.telemetry.push((args) => {
|
|
49
|
-
Object.assign(this.telemetryProperties, {
|
|
50
|
-
userId: typeof args.options.userId !== 'undefined',
|
|
51
|
-
userName: typeof args.options.userName !== 'undefined'
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}, _EntraUserLicenseAddCommand_initOptions = function _EntraUserLicenseAddCommand_initOptions() {
|
|
55
|
-
this.options.unshift({
|
|
56
|
-
option: '--userId [userId]'
|
|
57
|
-
}, {
|
|
58
|
-
option: '--userName [userName]'
|
|
59
|
-
}, {
|
|
60
|
-
option: '--ids <ids>'
|
|
61
|
-
});
|
|
62
|
-
}, _EntraUserLicenseAddCommand_initValidators = function _EntraUserLicenseAddCommand_initValidators() {
|
|
63
|
-
this.validators.push(async (args) => {
|
|
64
|
-
if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
|
|
65
|
-
return `${args.options.userId} is not a valid GUID`;
|
|
66
|
-
}
|
|
67
|
-
if (args.options.ids && args.options.ids.split(',').some(e => !validation.isValidGuid(e))) {
|
|
68
|
-
return `${args.options.ids} contains one or more invalid GUIDs`;
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
});
|
|
72
|
-
}, _EntraUserLicenseAddCommand_initOptionSets = function _EntraUserLicenseAddCommand_initOptionSets() {
|
|
73
|
-
this.optionSets.push({ options: ['userId', 'userName'] });
|
|
74
|
-
};
|
|
75
56
|
export default new EntraUserLicenseAddCommand();
|
|
76
57
|
//# sourceMappingURL=user-license-add.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
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 _EntraUserLicenseListCommand_instances, _EntraUserLicenseListCommand_initTelemetry, _EntraUserLicenseListCommand_initOptions, _EntraUserLicenseListCommand_initValidators, _EntraUserLicenseListCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
11
7
|
import GraphDelegatedCommand from '../../../base/GraphDelegatedCommand.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
userId: z.uuid().optional(),
|
|
11
|
+
userName: z.string().refine(name => validation.isValidUserPrincipalName(name), {
|
|
12
|
+
error: e => `'${e.input}' is not a valid user principal name (UPN).`
|
|
13
|
+
}).optional()
|
|
14
|
+
});
|
|
12
15
|
class EntraUserLicenseListCommand extends GraphDelegatedCommand {
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.USER_LICENSE_LIST;
|
|
@@ -19,13 +22,18 @@ class EntraUserLicenseListCommand extends GraphDelegatedCommand {
|
|
|
19
22
|
defaultProperties() {
|
|
20
23
|
return ['id', 'skuId', 'skuPartNumber'];
|
|
21
24
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
get schema() {
|
|
26
|
+
return options;
|
|
27
|
+
}
|
|
28
|
+
getRefinedSchema(schema) {
|
|
29
|
+
return schema
|
|
30
|
+
.refine(options => !options.userId || !options.userName, {
|
|
31
|
+
error: `Specify either 'userId' or 'userName', but not both.`,
|
|
32
|
+
params: {
|
|
33
|
+
customCode: 'optionSet',
|
|
34
|
+
options: ['userId', 'userName']
|
|
35
|
+
}
|
|
36
|
+
});
|
|
29
37
|
}
|
|
30
38
|
async commandAction(logger, args) {
|
|
31
39
|
if (this.verbose) {
|
|
@@ -48,34 +56,5 @@ class EntraUserLicenseListCommand extends GraphDelegatedCommand {
|
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
|
-
_EntraUserLicenseListCommand_instances = new WeakSet(), _EntraUserLicenseListCommand_initTelemetry = function _EntraUserLicenseListCommand_initTelemetry() {
|
|
52
|
-
this.telemetry.push((args) => {
|
|
53
|
-
Object.assign(this.telemetryProperties, {
|
|
54
|
-
userId: typeof args.options.userId !== 'undefined',
|
|
55
|
-
userName: typeof args.options.userName !== 'undefined'
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
}, _EntraUserLicenseListCommand_initOptions = function _EntraUserLicenseListCommand_initOptions() {
|
|
59
|
-
this.options.unshift({
|
|
60
|
-
option: '--userId [userId]'
|
|
61
|
-
}, {
|
|
62
|
-
option: '--userName [userName]'
|
|
63
|
-
});
|
|
64
|
-
}, _EntraUserLicenseListCommand_initValidators = function _EntraUserLicenseListCommand_initValidators() {
|
|
65
|
-
this.validators.push(async (args) => {
|
|
66
|
-
if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
|
|
67
|
-
return `${args.options.userId} is not a valid GUID`;
|
|
68
|
-
}
|
|
69
|
-
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
70
|
-
return `${args.options.userName} is not a valid user principal name (UPN)`;
|
|
71
|
-
}
|
|
72
|
-
return true;
|
|
73
|
-
});
|
|
74
|
-
}, _EntraUserLicenseListCommand_initOptionSets = function _EntraUserLicenseListCommand_initOptionSets() {
|
|
75
|
-
this.optionSets.push({
|
|
76
|
-
options: ['userId', 'userName'],
|
|
77
|
-
runsWhen: (args) => args.options.userId || args.options.userName
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
59
|
export default new EntraUserLicenseListCommand();
|
|
81
60
|
//# sourceMappingURL=user-license-list.js.map
|
|
@@ -1,15 +1,22 @@
|
|
|
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 _EntraUserLicenseRemoveCommand_instances, _EntraUserLicenseRemoveCommand_initTelemetry, _EntraUserLicenseRemoveCommand_initOptions, _EntraUserLicenseRemoveCommand_initOptionSets, _EntraUserLicenseRemoveCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import commands from '../../commands.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
7
|
import { cli } from '../../../../cli/cli.js';
|
|
12
8
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
userId: z.uuid().optional(),
|
|
12
|
+
userName: z.string().refine(name => validation.isValidUserPrincipalName(name), {
|
|
13
|
+
error: e => `'${e.input}' is not a valid user principal name (UPN).`
|
|
14
|
+
}).optional(),
|
|
15
|
+
ids: z.string().refine(ids => !ids.split(',').some(e => !validation.isValidGuid(e)), {
|
|
16
|
+
error: e => `'${e.input}' contains one or more invalid GUIDs.`
|
|
17
|
+
}),
|
|
18
|
+
force: z.boolean().optional().alias('f')
|
|
19
|
+
});
|
|
13
20
|
class EntraUserLicenseRemoveCommand extends GraphCommand {
|
|
14
21
|
get name() {
|
|
15
22
|
return commands.USER_LICENSE_REMOVE;
|
|
@@ -17,13 +24,18 @@ class EntraUserLicenseRemoveCommand extends GraphCommand {
|
|
|
17
24
|
get description() {
|
|
18
25
|
return 'Removes a license from a user';
|
|
19
26
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
get schema() {
|
|
28
|
+
return options;
|
|
29
|
+
}
|
|
30
|
+
getRefinedSchema(schema) {
|
|
31
|
+
return schema
|
|
32
|
+
.refine(options => [options.userId, options.userName].filter(o => o !== undefined).length === 1, {
|
|
33
|
+
error: `Specify either 'userId' or 'userName'.`,
|
|
34
|
+
params: {
|
|
35
|
+
customCode: 'optionSet',
|
|
36
|
+
options: ['userId', 'userName']
|
|
37
|
+
}
|
|
38
|
+
});
|
|
27
39
|
}
|
|
28
40
|
async commandAction(logger, args) {
|
|
29
41
|
if (this.verbose) {
|
|
@@ -58,39 +70,5 @@ class EntraUserLicenseRemoveCommand extends GraphCommand {
|
|
|
58
70
|
}
|
|
59
71
|
}
|
|
60
72
|
}
|
|
61
|
-
_EntraUserLicenseRemoveCommand_instances = new WeakSet(), _EntraUserLicenseRemoveCommand_initTelemetry = function _EntraUserLicenseRemoveCommand_initTelemetry() {
|
|
62
|
-
this.telemetry.push((args) => {
|
|
63
|
-
Object.assign(this.telemetryProperties, {
|
|
64
|
-
userId: typeof args.options.userId !== 'undefined',
|
|
65
|
-
userName: typeof args.options.userName !== 'undefined',
|
|
66
|
-
force: !!args.options.force
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
}, _EntraUserLicenseRemoveCommand_initOptions = function _EntraUserLicenseRemoveCommand_initOptions() {
|
|
70
|
-
this.options.unshift({
|
|
71
|
-
option: '--userId [userId]'
|
|
72
|
-
}, {
|
|
73
|
-
option: '--userName [userName]'
|
|
74
|
-
}, {
|
|
75
|
-
option: '--ids <ids>'
|
|
76
|
-
}, {
|
|
77
|
-
option: '-f, --force'
|
|
78
|
-
});
|
|
79
|
-
}, _EntraUserLicenseRemoveCommand_initOptionSets = function _EntraUserLicenseRemoveCommand_initOptionSets() {
|
|
80
|
-
this.optionSets.push({ options: ['userId', 'userName'] });
|
|
81
|
-
}, _EntraUserLicenseRemoveCommand_initValidators = function _EntraUserLicenseRemoveCommand_initValidators() {
|
|
82
|
-
this.validators.push(async (args) => {
|
|
83
|
-
if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
|
|
84
|
-
return `${args.options.userId} is not a valid GUID`;
|
|
85
|
-
}
|
|
86
|
-
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
87
|
-
return `${args.options.userName} is not a valid user principal name (UPN)`;
|
|
88
|
-
}
|
|
89
|
-
if (args.options.ids && args.options.ids.split(',').some(e => !validation.isValidGuid(e))) {
|
|
90
|
-
return `${args.options.ids} contains one or more invalid GUIDs`;
|
|
91
|
-
}
|
|
92
|
-
return true;
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
73
|
export default new EntraUserLicenseRemoveCommand();
|
|
96
74
|
//# sourceMappingURL=user-license-remove.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
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 _EntraUserListCommand_instances, _a, _EntraUserListCommand_initTelemetry, _EntraUserListCommand_initOptions, _EntraUserListCommand_initValidators, _EntraUserListCommand_initTypes;
|
|
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 GraphCommand from '../../../base/GraphCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
11
7
|
import { optionsUtils } from '../../../../utils/optionsUtils.js';
|
|
8
|
+
import { zod } from '../../../../utils/zod.js';
|
|
9
|
+
const allowedTypes = { Member: 'Member', Guest: 'Guest' };
|
|
10
|
+
export const options = z.looseObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
type: zod.coercedEnum(allowedTypes).optional(),
|
|
13
|
+
properties: z.string().optional().alias('p')
|
|
14
|
+
});
|
|
12
15
|
class EntraUserListCommand extends GraphCommand {
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.USER_LIST;
|
|
@@ -22,13 +25,8 @@ class EntraUserListCommand extends GraphCommand {
|
|
|
22
25
|
defaultProperties() {
|
|
23
26
|
return ['id', 'displayName', 'mail', 'userPrincipalName'];
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
_EntraUserListCommand_instances.add(this);
|
|
28
|
-
__classPrivateFieldGet(this, _EntraUserListCommand_instances, "m", _EntraUserListCommand_initTelemetry).call(this);
|
|
29
|
-
__classPrivateFieldGet(this, _EntraUserListCommand_instances, "m", _EntraUserListCommand_initOptions).call(this);
|
|
30
|
-
__classPrivateFieldGet(this, _EntraUserListCommand_instances, "m", _EntraUserListCommand_initValidators).call(this);
|
|
31
|
-
__classPrivateFieldGet(this, _EntraUserListCommand_instances, "m", _EntraUserListCommand_initTypes).call(this);
|
|
28
|
+
get schema() {
|
|
29
|
+
return options;
|
|
32
30
|
}
|
|
33
31
|
async commandAction(logger, args) {
|
|
34
32
|
try {
|
|
@@ -57,7 +55,7 @@ class EntraUserListCommand extends GraphCommand {
|
|
|
57
55
|
}
|
|
58
56
|
getFilter(options) {
|
|
59
57
|
const filters = [];
|
|
60
|
-
const unknownOptions = optionsUtils.getUnknownOptions(options, this.
|
|
58
|
+
const unknownOptions = optionsUtils.getUnknownOptions(options, zod.schemaToOptions(this.schema));
|
|
61
59
|
Object.keys(unknownOptions).forEach(key => {
|
|
62
60
|
if (typeof options[key] === 'boolean') {
|
|
63
61
|
throw `Specify value for the ${key} property`;
|
|
@@ -73,30 +71,5 @@ class EntraUserListCommand extends GraphCommand {
|
|
|
73
71
|
return null;
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
|
-
_a = EntraUserListCommand, _EntraUserListCommand_instances = new WeakSet(), _EntraUserListCommand_initTelemetry = function _EntraUserListCommand_initTelemetry() {
|
|
77
|
-
this.telemetry.push((args) => {
|
|
78
|
-
Object.assign(this.telemetryProperties, {
|
|
79
|
-
type: typeof args.options.type !== 'undefined',
|
|
80
|
-
properties: typeof args.options.properties !== 'undefined'
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
}, _EntraUserListCommand_initOptions = function _EntraUserListCommand_initOptions() {
|
|
84
|
-
this.options.unshift({
|
|
85
|
-
option: '--type [type]',
|
|
86
|
-
autocomplete: _a.allowedTypes
|
|
87
|
-
}, {
|
|
88
|
-
option: '-p, --properties [properties]'
|
|
89
|
-
});
|
|
90
|
-
}, _EntraUserListCommand_initValidators = function _EntraUserListCommand_initValidators() {
|
|
91
|
-
this.validators.push(async (args) => {
|
|
92
|
-
if (args.options.type && !_a.allowedTypes.some(t => t.toLowerCase() === args.options.type.toLowerCase())) {
|
|
93
|
-
return `'${args.options.type}' is not a valid value for option 'type'. Allowed values are: ${_a.allowedTypes.join(', ')}.`;
|
|
94
|
-
}
|
|
95
|
-
return true;
|
|
96
|
-
});
|
|
97
|
-
}, _EntraUserListCommand_initTypes = function _EntraUserListCommand_initTypes() {
|
|
98
|
-
this.types.string.push('type', 'properties');
|
|
99
|
-
};
|
|
100
|
-
EntraUserListCommand.allowedTypes = ['Member', 'Guest'];
|
|
101
74
|
export default new EntraUserListCommand();
|
|
102
75
|
//# sourceMappingURL=user-list.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 _EntraUserPasswordValidateCommand_instances, _EntraUserPasswordValidateCommand_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';
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
password: z.string().alias('p')
|
|
9
|
+
});
|
|
10
10
|
class EntraUserPasswordValidateCommand extends GraphCommand {
|
|
11
11
|
get name() {
|
|
12
12
|
return commands.USER_PASSWORD_VALIDATE;
|
|
@@ -14,10 +14,8 @@ class EntraUserPasswordValidateCommand extends GraphCommand {
|
|
|
14
14
|
get description() {
|
|
15
15
|
return "Check a user's password against the organization's password validation policy";
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_EntraUserPasswordValidateCommand_instances.add(this);
|
|
20
|
-
__classPrivateFieldGet(this, _EntraUserPasswordValidateCommand_instances, "m", _EntraUserPasswordValidateCommand_initOptions).call(this);
|
|
17
|
+
get schema() {
|
|
18
|
+
return options;
|
|
21
19
|
}
|
|
22
20
|
async commandAction(logger, args) {
|
|
23
21
|
try {
|
|
@@ -39,10 +37,5 @@ class EntraUserPasswordValidateCommand extends GraphCommand {
|
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
|
-
_EntraUserPasswordValidateCommand_instances = new WeakSet(), _EntraUserPasswordValidateCommand_initOptions = function _EntraUserPasswordValidateCommand_initOptions() {
|
|
43
|
-
this.options.unshift({
|
|
44
|
-
option: '-p, --password <password>'
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
40
|
export default new EntraUserPasswordValidateCommand();
|
|
48
41
|
//# sourceMappingURL=user-password-validate.js.map
|
|
@@ -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 _EntraUserRecycleBinItemClearCommand_instances, _EntraUserRecycleBinItemClearCommand_initTelemetry, _EntraUserRecycleBinItemClearCommand_initOptions;
|
|
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 GraphCommand from '../../../base/GraphCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
force: z.boolean().optional().alias('f')
|
|
11
|
+
});
|
|
12
12
|
class EntraUserRecycleBinItemClearCommand extends GraphCommand {
|
|
13
13
|
get name() {
|
|
14
14
|
return commands.USER_RECYCLEBINITEM_CLEAR;
|
|
@@ -16,11 +16,8 @@ class EntraUserRecycleBinItemClearCommand extends GraphCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Removes all users from the tenant recycle bin';
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_EntraUserRecycleBinItemClearCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraUserRecycleBinItemClearCommand_instances, "m", _EntraUserRecycleBinItemClearCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _EntraUserRecycleBinItemClearCommand_instances, "m", _EntraUserRecycleBinItemClearCommand_initOptions).call(this);
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
24
21
|
}
|
|
25
22
|
async commandAction(logger, args) {
|
|
26
23
|
const clearRecycleBinUsers = async () => {
|
|
@@ -70,16 +67,5 @@ class EntraUserRecycleBinItemClearCommand extends GraphCommand {
|
|
|
70
67
|
}
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
|
-
_EntraUserRecycleBinItemClearCommand_instances = new WeakSet(), _EntraUserRecycleBinItemClearCommand_initTelemetry = function _EntraUserRecycleBinItemClearCommand_initTelemetry() {
|
|
74
|
-
this.telemetry.push((args) => {
|
|
75
|
-
Object.assign(this.telemetryProperties, {
|
|
76
|
-
force: !!args.options.force
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
}, _EntraUserRecycleBinItemClearCommand_initOptions = function _EntraUserRecycleBinItemClearCommand_initOptions() {
|
|
80
|
-
this.options.unshift({
|
|
81
|
-
option: '-f, --force'
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
70
|
export default new EntraUserRecycleBinItemClearCommand();
|
|
85
71
|
//# sourceMappingURL=user-recyclebinitem-clear.js.map
|
|
@@ -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 _EntraUserRecycleBinItemRemoveCommand_instances, _EntraUserRecycleBinItemRemoveCommand_initTelemetry, _EntraUserRecycleBinItemRemoveCommand_initOptions, _EntraUserRecycleBinItemRemoveCommand_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(),
|
|
10
|
+
force: z.boolean().optional().alias('f')
|
|
11
|
+
});
|
|
12
12
|
class EntraUserRecycleBinItemRemoveCommand extends GraphCommand {
|
|
13
13
|
get name() {
|
|
14
14
|
return commands.USER_RECYCLEBINITEM_REMOVE;
|
|
@@ -16,12 +16,8 @@ class EntraUserRecycleBinItemRemoveCommand extends GraphCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Removes a user from the recycle bin in the current tenant';
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_EntraUserRecycleBinItemRemoveCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _EntraUserRecycleBinItemRemoveCommand_instances, "m", _EntraUserRecycleBinItemRemoveCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _EntraUserRecycleBinItemRemoveCommand_instances, "m", _EntraUserRecycleBinItemRemoveCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _EntraUserRecycleBinItemRemoveCommand_instances, "m", _EntraUserRecycleBinItemRemoveCommand_initValidators).call(this);
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
25
21
|
}
|
|
26
22
|
async commandAction(logger, args) {
|
|
27
23
|
const clearRecycleBinItem = async () => {
|
|
@@ -50,25 +46,5 @@ class EntraUserRecycleBinItemRemoveCommand extends GraphCommand {
|
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
|
-
_EntraUserRecycleBinItemRemoveCommand_instances = new WeakSet(), _EntraUserRecycleBinItemRemoveCommand_initTelemetry = function _EntraUserRecycleBinItemRemoveCommand_initTelemetry() {
|
|
54
|
-
this.telemetry.push((args) => {
|
|
55
|
-
Object.assign(this.telemetryProperties, {
|
|
56
|
-
force: !!args.options.force
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}, _EntraUserRecycleBinItemRemoveCommand_initOptions = function _EntraUserRecycleBinItemRemoveCommand_initOptions() {
|
|
60
|
-
this.options.unshift({
|
|
61
|
-
option: '--id <id>'
|
|
62
|
-
}, {
|
|
63
|
-
option: '-f, --force'
|
|
64
|
-
});
|
|
65
|
-
}, _EntraUserRecycleBinItemRemoveCommand_initValidators = function _EntraUserRecycleBinItemRemoveCommand_initValidators() {
|
|
66
|
-
this.validators.push(async (args) => {
|
|
67
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
68
|
-
return `${args.options.id} is not a valid GUID`;
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
49
|
export default new EntraUserRecycleBinItemRemoveCommand();
|
|
74
50
|
//# sourceMappingURL=user-recyclebinitem-remove.js.map
|