@pnp/cli-microsoft365 11.0.0-beta.88d51e6 → 11.0.0
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 +4 -0
- package/dist/config.js +1 -0
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +13 -27
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +18 -43
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +10 -21
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +25 -49
- package/dist/m365/entra/commands/group/group-member-add.js +6 -27
- package/dist/m365/entra/commands/group/group-member-set.js +5 -26
- package/dist/m365/entra/commands/m365group/m365group-get.js +1 -7
- package/dist/m365/entra/commands/m365group/m365group-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +1 -7
- package/dist/m365/entra/commands/roleassignment/roleassignment-add.js +146 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/flow/commands/flow-list.js +7 -14
- package/dist/m365/flow/commands/run/run-get.js +1 -7
- package/dist/m365/graph/commands/openextension/openextension-add.js +2 -2
- package/dist/m365/graph/commands/openextension/openextension-set.js +2 -6
- package/dist/m365/graph/commands/subscription/subscription-add.js +3 -10
- package/dist/m365/pp/commands/copilot/copilot-get.js +0 -4
- package/dist/m365/pp/commands/copilot/copilot-list.js +0 -4
- package/dist/m365/pp/commands/copilot/copilot-remove.js +0 -4
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +1 -8
- package/dist/m365/pp/commands.js +0 -3
- package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +1 -7
- package/dist/m365/spe/commands/container/container-add.js +1 -3
- package/dist/m365/spe/commands/container/container-list.js +1 -3
- package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +1 -3
- package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +1 -3
- package/dist/m365/spe/commands/container/container-remove.js +1 -3
- package/dist/m365/spe/commands/containertype/containertype-add.js +67 -90
- package/dist/m365/spe/commands/containertype/containertype-get.js +53 -81
- package/dist/m365/spe/commands/containertype/containertype-list.js +8 -19
- package/dist/m365/spe/commands/containertype/containertype-remove.js +27 -5
- package/dist/m365/spfx/commands/project/project-upgrade.js +23 -66
- package/dist/m365/spo/commands/file/file-move.js +2 -8
- package/dist/m365/spo/commands/homesite/homesite-add.js +26 -2
- package/dist/m365/spo/commands/homesite/homesite-get.js +28 -14
- package/dist/m365/spo/commands/homesite/homesite-list.js +1 -12
- package/dist/m365/spo/commands/homesite/homesite-remove.js +6 -34
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +4 -13
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +1 -8
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +17 -25
- package/dist/m365/spo/commands/{tenant/tenant-site-archive.js → site/site-archive.js} +14 -14
- package/dist/m365/spo/commands/{tenant/tenant-site-list.js → site/site-list.js} +16 -27
- package/dist/m365/spo/commands/{tenant/tenant-site-membership-list.js → site/site-membership-list.js} +15 -15
- package/dist/m365/spo/commands/{tenant/tenant-site-rename.js → site/site-rename.js} +14 -14
- package/dist/m365/spo/commands/{tenant/tenant-site-unarchive.js → site/site-unarchive.js} +14 -14
- package/dist/m365/spo/commands/term/term-list.js +1 -7
- package/dist/m365/spo/commands.js +4 -6
- package/dist/m365/teams/commands/chat/chat-member-add.js +3 -9
- package/dist/m365/viva/commands/engage/engage-network-list.js +1 -7
- package/dist/utils/entraAdministrativeUnit.js +1 -1
- package/dist/utils/spe.js +5 -39
- package/docs/docs/cmd/entra/group/group-member-add.mdx +7 -26
- package/docs/docs/cmd/entra/group/group-member-set.mdx +5 -23
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +0 -3
- package/docs/docs/cmd/entra/m365group/m365group-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +0 -3
- package/docs/docs/cmd/entra/roleassignment/roleassignment-add.mdx +163 -0
- package/docs/docs/cmd/flow/flow-list.mdx +0 -3
- package/docs/docs/cmd/flow/run/run-get.mdx +0 -3
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +0 -3
- package/docs/docs/cmd/pp/copilot/copilot-get.mdx +0 -6
- package/docs/docs/cmd/pp/copilot/copilot-list.mdx +0 -6
- package/docs/docs/cmd/pp/copilot/copilot-remove.mdx +0 -6
- package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +0 -3
- package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +0 -3
- package/docs/docs/cmd/spe/container/container-activate.mdx +21 -0
- package/docs/docs/cmd/spe/container/container-add.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-get.mdx +20 -1
- package/docs/docs/cmd/spe/container/container-list.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-permission-list.mdx +19 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +31 -0
- package/docs/docs/cmd/spe/container/container-remove.mdx +31 -0
- package/docs/docs/cmd/spe/containertype/containertype-add.mdx +111 -55
- package/docs/docs/cmd/spe/containertype/containertype-get.mdx +69 -38
- package/docs/docs/cmd/spe/containertype/containertype-list.mdx +59 -31
- package/docs/docs/cmd/spe/containertype/containertype-remove.mdx +31 -4
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +18 -5
- package/docs/docs/cmd/spo/file/file-move.mdx +0 -3
- package/docs/docs/cmd/spo/homesite/homesite-add.mdx +13 -4
- package/docs/docs/cmd/spo/homesite/homesite-get.mdx +44 -23
- package/docs/docs/cmd/spo/homesite/homesite-list.mdx +0 -6
- package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +10 -35
- package/docs/docs/cmd/spo/homesite/homesite-set.mdx +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +0 -3
- package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +0 -3
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.mdx +18 -18
- package/docs/docs/cmd/spo/{tenant/tenant-site-archive.mdx → site/site-archive.mdx} +4 -4
- package/docs/docs/cmd/spo/{tenant/tenant-site-list.mdx → site/site-list.mdx} +7 -16
- package/docs/docs/cmd/spo/{tenant/tenant-site-membership-list.mdx → site/site-membership-list.mdx} +5 -5
- package/docs/docs/cmd/spo/{tenant/tenant-site-rename.mdx → site/site-rename.mdx} +7 -7
- package/docs/docs/cmd/spo/{tenant/tenant-site-unarchive.mdx → site/site-unarchive.mdx} +4 -4
- package/docs/docs/cmd/spo/term/term-list.mdx +0 -3
- package/docs/docs/cmd/teams/chat/chat-member-add.mdx +2 -5
- package/docs/docs/cmd/viva/engage/engage-network-list.mdx +0 -3
- package/package.json +2 -2
- package/dist/m365/spo/commands/tenant/SPOTenantSitePropertiesEnumerable.js +0 -2
- package/dist/m365/spo/commands/tenant/TenantSiteProperties.js +0 -2
|
@@ -30,9 +30,6 @@ class EntraPimRoleRequestListCommand extends GraphCommand {
|
|
|
30
30
|
__classPrivateFieldGet(this, _EntraPimRoleRequestListCommand_instances, "m", _EntraPimRoleRequestListCommand_initOptionSets).call(this);
|
|
31
31
|
}
|
|
32
32
|
async commandAction(logger, args) {
|
|
33
|
-
if (args.options.includePrincipalDetails) {
|
|
34
|
-
await this.warn(logger, `Parameter 'includePrincipalDetails' is deprecated. Please use 'withPrincipalDetails' instead`);
|
|
35
|
-
}
|
|
36
33
|
if (this.verbose) {
|
|
37
34
|
await logger.logToStderr(`Retrieving list of PIM roles requests for ${args.options.userId || args.options.userName || args.options.groupId || args.options.groupName || 'all users'}...`);
|
|
38
35
|
}
|
|
@@ -54,7 +51,7 @@ class EntraPimRoleRequestListCommand extends GraphCommand {
|
|
|
54
51
|
queryParameters.push(`$filter=${filters.join(' and ')}`);
|
|
55
52
|
}
|
|
56
53
|
expands.push('roleDefinition($select=displayName)');
|
|
57
|
-
if (args.options.
|
|
54
|
+
if (args.options.withPrincipalDetails) {
|
|
58
55
|
expands.push('principal');
|
|
59
56
|
}
|
|
60
57
|
queryParameters.push(`$expand=${expands.join(',')}`);
|
|
@@ -103,7 +100,6 @@ _EntraPimRoleRequestListCommand_instances = new WeakSet(), _EntraPimRoleRequestL
|
|
|
103
100
|
groupName: typeof args.options.groupName !== 'undefined',
|
|
104
101
|
createdDateTime: typeof args.options.createdDateTime !== 'undefined',
|
|
105
102
|
status: typeof args.options.status !== 'undefined',
|
|
106
|
-
includePrincipalDetails: !!args.options.includePrincipalDetails,
|
|
107
103
|
withPrincipalDetails: !!args.options.withPrincipalDetails
|
|
108
104
|
});
|
|
109
105
|
});
|
|
@@ -121,8 +117,6 @@ _EntraPimRoleRequestListCommand_instances = new WeakSet(), _EntraPimRoleRequestL
|
|
|
121
117
|
}, {
|
|
122
118
|
option: '-s, --status [status]',
|
|
123
119
|
autocomplete: this.allowedStatuses
|
|
124
|
-
}, {
|
|
125
|
-
option: '--includePrincipalDetails'
|
|
126
120
|
}, {
|
|
127
121
|
option: '--withPrincipalDetails'
|
|
128
122
|
});
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
4
|
+
import commands from '../../commands.js';
|
|
5
|
+
import request from '../../../../request.js';
|
|
6
|
+
import { validation } from '../../../../utils/validation.js';
|
|
7
|
+
import { entraAdministrativeUnit } from '../../../../utils/entraAdministrativeUnit.js';
|
|
8
|
+
import { entraApp } from '../../../../utils/entraApp.js';
|
|
9
|
+
import { entraServicePrincipal } from '../../../../utils/entraServicePrincipal.js';
|
|
10
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
11
|
+
import { roleDefinition } from '../../../../utils/roleDefinition.js';
|
|
12
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
13
|
+
const options = globalOptionsZod
|
|
14
|
+
.extend({
|
|
15
|
+
roleDefinitionId: z.string().refine(id => validation.isValidGuid(id), id => ({
|
|
16
|
+
message: `'${id}' is not a valid GUID.`
|
|
17
|
+
})).optional(),
|
|
18
|
+
roleDefinitionName: z.string().optional(),
|
|
19
|
+
principal: z.string().refine(principal => validation.isValidGuid(principal) || validation.isValidUserPrincipalName(principal) || validation.isValidMailNickname(principal), principal => ({
|
|
20
|
+
message: `'${principal}' is not a valid GUID, UPN or group mail nickname.`
|
|
21
|
+
})),
|
|
22
|
+
userId: z.string().refine(id => validation.isValidGuid(id), id => ({
|
|
23
|
+
message: `'${id}' is not a valid GUID.`
|
|
24
|
+
})).optional(),
|
|
25
|
+
userName: z.string().refine(upn => validation.isValidUserPrincipalName(upn), upn => ({
|
|
26
|
+
message: `'${upn}' is not a valid UPN.`
|
|
27
|
+
})).optional(),
|
|
28
|
+
administrativeUnitId: z.string().refine(id => validation.isValidGuid(id), id => ({
|
|
29
|
+
message: `'${id}' is not a valid GUID.`
|
|
30
|
+
})).optional(),
|
|
31
|
+
administrativeUnitName: z.string().optional(),
|
|
32
|
+
applicationId: z.string().refine(id => validation.isValidGuid(id), id => ({
|
|
33
|
+
message: `'${id}' is not a valid GUID.`
|
|
34
|
+
})).optional(),
|
|
35
|
+
applicationObjectId: z.string().refine(id => validation.isValidGuid(id), id => ({
|
|
36
|
+
message: `'${id}' is not a valid GUID.`
|
|
37
|
+
})).optional(),
|
|
38
|
+
applicationName: z.string().optional(),
|
|
39
|
+
servicePrincipalId: z.string().refine(id => validation.isValidGuid(id), id => ({
|
|
40
|
+
message: `'${id}' is not a valid GUID.`
|
|
41
|
+
})).optional(),
|
|
42
|
+
servicePrincipalName: z.string().optional(),
|
|
43
|
+
groupId: z.string().refine(id => validation.isValidGuid(id), id => ({
|
|
44
|
+
message: `'${id}' is not a valid GUID.`
|
|
45
|
+
})).optional(),
|
|
46
|
+
groupName: z.string().optional()
|
|
47
|
+
})
|
|
48
|
+
.strict();
|
|
49
|
+
class EntraRoleAssignmentAddCommand extends GraphCommand {
|
|
50
|
+
get name() {
|
|
51
|
+
return commands.ROLEASSIGNMENT_ADD;
|
|
52
|
+
}
|
|
53
|
+
get description() {
|
|
54
|
+
return 'Assign a Entra ID role to a user and specify the scope for which the user has been granted access';
|
|
55
|
+
}
|
|
56
|
+
get schema() {
|
|
57
|
+
return options;
|
|
58
|
+
}
|
|
59
|
+
getRefinedSchema(schema) {
|
|
60
|
+
return schema
|
|
61
|
+
.refine(options => [options.roleDefinitionId, options.roleDefinitionName].filter(o => o !== undefined).length === 1, {
|
|
62
|
+
message: 'Specify either roleDefinitionId or roleDefinitionName'
|
|
63
|
+
})
|
|
64
|
+
.refine(options => Object.values([options.userId, options.userName, options.administrativeUnitId, options.administrativeUnitName, options.applicationId, options.applicationObjectId, options.applicationName,
|
|
65
|
+
options.servicePrincipalId, options.servicePrincipalName, options.groupId, options.groupName]).filter(v => typeof v !== 'undefined').length < 2, {
|
|
66
|
+
message: 'Provide value for only one of the following parameters: userId, userName, administrativeUnitId, administrativeUnitName, applicationId, applicationObjectId, applicationName, servicePrincipalId, servicePrincipalName, groupId or groupName'
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async commandAction(logger, args) {
|
|
70
|
+
try {
|
|
71
|
+
const roleDefinitionId = await this.getRoleDefinitionId(args.options, logger);
|
|
72
|
+
const data = {
|
|
73
|
+
roleDefinitionId: roleDefinitionId,
|
|
74
|
+
principalId: await this.getPrincipalId(args.options, logger),
|
|
75
|
+
directoryScopeId: await this.getDirectoryScopeId(args.options)
|
|
76
|
+
};
|
|
77
|
+
const requestOptions = {
|
|
78
|
+
url: `${this.resource}/v1.0/roleManagement/directory/roleAssignments`,
|
|
79
|
+
headers: {
|
|
80
|
+
accept: 'application/json;odata.metadata=none'
|
|
81
|
+
},
|
|
82
|
+
responseType: 'json',
|
|
83
|
+
data: data
|
|
84
|
+
};
|
|
85
|
+
const response = await request.post(requestOptions);
|
|
86
|
+
await logger.log(response);
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
this.handleRejectedODataJsonPromise(err);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async getRoleDefinitionId(options, logger) {
|
|
93
|
+
if (options.roleDefinitionId) {
|
|
94
|
+
return options.roleDefinitionId;
|
|
95
|
+
}
|
|
96
|
+
if (this.verbose) {
|
|
97
|
+
await logger.logToStderr(`Retrieving role definition by its name '${options.roleDefinitionName}'`);
|
|
98
|
+
}
|
|
99
|
+
const role = await roleDefinition.getRoleDefinitionByDisplayName(options.roleDefinitionName);
|
|
100
|
+
return role.id;
|
|
101
|
+
}
|
|
102
|
+
async getPrincipalId(options, logger) {
|
|
103
|
+
if (validation.isValidGuid(options.principal)) {
|
|
104
|
+
return options.principal;
|
|
105
|
+
}
|
|
106
|
+
if (validation.isValidUserPrincipalName(options.principal)) {
|
|
107
|
+
if (this.verbose) {
|
|
108
|
+
await logger.logToStderr(`Retrieving user id by UPN '${options.principal}'`);
|
|
109
|
+
}
|
|
110
|
+
return await entraUser.getUserIdByUpn(options.principal);
|
|
111
|
+
}
|
|
112
|
+
if (this.verbose) {
|
|
113
|
+
await logger.logToStderr(`Retrieving group id by mail nickname '${options.principal}'`);
|
|
114
|
+
}
|
|
115
|
+
return await entraGroup.getGroupIdByMailNickname(options.principal);
|
|
116
|
+
}
|
|
117
|
+
async getDirectoryScopeId(options) {
|
|
118
|
+
let prefix = '/';
|
|
119
|
+
let resourceId = '';
|
|
120
|
+
if (options.userId || options.userName) {
|
|
121
|
+
resourceId = options.userId || await entraUser.getUserIdByUpn(options.userName);
|
|
122
|
+
}
|
|
123
|
+
else if (options.administrativeUnitId || options.administrativeUnitName) {
|
|
124
|
+
prefix = '/administrativeUnits/';
|
|
125
|
+
resourceId = options.administrativeUnitId || (await entraAdministrativeUnit.getAdministrativeUnitByDisplayName(options.administrativeUnitName, "id")).id;
|
|
126
|
+
}
|
|
127
|
+
else if (options.applicationId || options.applicationObjectId || options.applicationName) {
|
|
128
|
+
resourceId = options.applicationObjectId;
|
|
129
|
+
if (options.applicationId) {
|
|
130
|
+
resourceId = (await entraApp.getAppRegistrationByAppId(options.applicationId, ["id"])).id;
|
|
131
|
+
}
|
|
132
|
+
else if (options.applicationName) {
|
|
133
|
+
resourceId = (await entraApp.getAppRegistrationByAppName(options.applicationName, ["id"])).id;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else if (options.servicePrincipalId || options.servicePrincipalName) {
|
|
137
|
+
resourceId = options.servicePrincipalId || (await entraServicePrincipal.getServicePrincipalByAppName(options.servicePrincipalName, "id")).id;
|
|
138
|
+
}
|
|
139
|
+
else if (options.groupId || options.groupName) {
|
|
140
|
+
resourceId = options.groupId || (await entraGroup.getGroupIdByDisplayName(options.groupName));
|
|
141
|
+
}
|
|
142
|
+
return `${prefix}${resourceId}`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export default new EntraRoleAssignmentAddCommand();
|
|
146
|
+
//# sourceMappingURL=roleassignment-add.js.map
|
|
@@ -92,6 +92,7 @@ export default {
|
|
|
92
92
|
PIM_ROLE_REQUEST_LIST: `${prefix} pim role request list`,
|
|
93
93
|
POLICY_LIST: `${prefix} policy list`,
|
|
94
94
|
RESOURCENAMESPACE_LIST: `${prefix} resourcenamespace list`,
|
|
95
|
+
ROLEASSIGNMENT_ADD: `${prefix} roleassignment add`,
|
|
95
96
|
ROLEDEFINITION_ADD: `${prefix} roledefinition add`,
|
|
96
97
|
ROLEDEFINITION_LIST: `${prefix} roledefinition list`,
|
|
97
98
|
ROLEDEFINITION_GET: `${prefix} roledefinition get`,
|
|
@@ -28,33 +28,29 @@ class FlowListCommand extends PowerAutomateCommand {
|
|
|
28
28
|
__classPrivateFieldGet(this, _FlowListCommand_instances, "m", _FlowListCommand_initTypes).call(this);
|
|
29
29
|
}
|
|
30
30
|
async commandAction(logger, args) {
|
|
31
|
-
if (args.options.includeSolutions) {
|
|
32
|
-
await this.warn(logger, `Parameter 'includeSolutions' is deprecated. Please use 'withSolutions' instead`);
|
|
33
|
-
}
|
|
34
31
|
if (this.verbose) {
|
|
35
32
|
await logger.logToStderr(`Getting Power Automate flows${args.options.asAdmin ? ' as admin' : ''} in environment '${args.options.environmentName}'...`);
|
|
36
33
|
}
|
|
37
34
|
try {
|
|
38
|
-
const { environmentName, asAdmin, sharingStatus,
|
|
35
|
+
const { environmentName, asAdmin, sharingStatus, withSolutions } = args.options;
|
|
39
36
|
let items = [];
|
|
40
|
-
const shouldIncludeSolutions = withSolutions || includeSolutions;
|
|
41
37
|
if (sharingStatus === 'personal') {
|
|
42
|
-
const url = this.getApiUrl(environmentName, asAdmin,
|
|
38
|
+
const url = this.getApiUrl(environmentName, asAdmin, withSolutions, 'personal');
|
|
43
39
|
items = await odata.getAllItems(url);
|
|
44
40
|
}
|
|
45
41
|
else if (sharingStatus === 'sharedWithMe') {
|
|
46
|
-
const url = this.getApiUrl(environmentName, asAdmin,
|
|
42
|
+
const url = this.getApiUrl(environmentName, asAdmin, withSolutions, 'team');
|
|
47
43
|
items = await odata.getAllItems(url);
|
|
48
44
|
}
|
|
49
45
|
else if (sharingStatus === 'all') {
|
|
50
|
-
let url = this.getApiUrl(environmentName, asAdmin,
|
|
46
|
+
let url = this.getApiUrl(environmentName, asAdmin, withSolutions, 'personal');
|
|
51
47
|
items = await odata.getAllItems(url);
|
|
52
|
-
url = this.getApiUrl(environmentName, asAdmin,
|
|
48
|
+
url = this.getApiUrl(environmentName, asAdmin, withSolutions, 'team');
|
|
53
49
|
const teamFlows = await odata.getAllItems(url);
|
|
54
50
|
items = items.concat(teamFlows);
|
|
55
51
|
}
|
|
56
52
|
else {
|
|
57
|
-
const url = this.getApiUrl(environmentName, asAdmin,
|
|
53
|
+
const url = this.getApiUrl(environmentName, asAdmin, withSolutions);
|
|
58
54
|
items = await odata.getAllItems(url);
|
|
59
55
|
}
|
|
60
56
|
// Remove duplicates
|
|
@@ -84,7 +80,6 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
|
|
|
84
80
|
this.telemetry.push((args) => {
|
|
85
81
|
Object.assign(this.telemetryProperties, {
|
|
86
82
|
sharingStatus: typeof args.options.sharingStatus !== 'undefined',
|
|
87
|
-
includeSolutions: !!args.options.includeSolutions,
|
|
88
83
|
withSolutions: !!args.options.withSolutions,
|
|
89
84
|
asAdmin: !!args.options.asAdmin
|
|
90
85
|
});
|
|
@@ -95,8 +90,6 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
|
|
|
95
90
|
}, {
|
|
96
91
|
option: '--sharingStatus [sharingStatus]',
|
|
97
92
|
autocomplete: this.allowedSharingStatuses
|
|
98
|
-
}, {
|
|
99
|
-
option: '--includeSolutions'
|
|
100
93
|
}, {
|
|
101
94
|
option: '--withSolutions'
|
|
102
95
|
}, {
|
|
@@ -114,7 +107,7 @@ _FlowListCommand_instances = new WeakSet(), _FlowListCommand_initTelemetry = fun
|
|
|
114
107
|
});
|
|
115
108
|
}, _FlowListCommand_initTypes = function _FlowListCommand_initTypes() {
|
|
116
109
|
this.types.string.push('environmentName', 'sharingStatus');
|
|
117
|
-
this.types.boolean.push('
|
|
110
|
+
this.types.boolean.push('withSolutions', 'asAdmin');
|
|
118
111
|
};
|
|
119
112
|
export default new FlowListCommand();
|
|
120
113
|
//# sourceMappingURL=flow-list.js.map
|
|
@@ -27,9 +27,6 @@ class FlowRunGetCommand extends PowerAutomateCommand {
|
|
|
27
27
|
if (this.verbose) {
|
|
28
28
|
await logger.logToStderr(`Retrieving information about run ${args.options.name} of Microsoft Flow ${args.options.flowName}...`);
|
|
29
29
|
}
|
|
30
|
-
if (args.options.includeTriggerInformation) {
|
|
31
|
-
await this.warn(logger, `Parameter 'includeTriggerInformation' is deprecated. Please use 'withTrigger' instead`);
|
|
32
|
-
}
|
|
33
30
|
const actionsParameter = args.options.withActions ? '$expand=properties%2Factions&' : '';
|
|
34
31
|
const requestOptions = {
|
|
35
32
|
url: `${PowerAutomateCommand.resource}/providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/runs/${formatting.encodeQueryParameter(args.options.name)}?${actionsParameter}api-version=2016-11-01`,
|
|
@@ -44,7 +41,7 @@ class FlowRunGetCommand extends PowerAutomateCommand {
|
|
|
44
41
|
res.endTime = res.properties.endTime || '';
|
|
45
42
|
res.status = res.properties.status;
|
|
46
43
|
res.triggerName = res.properties.trigger.name;
|
|
47
|
-
if (
|
|
44
|
+
if (args.options.withTrigger && res.properties.trigger.outputsLink) {
|
|
48
45
|
res.triggerInformation = await this.getTriggerInformation(res);
|
|
49
46
|
}
|
|
50
47
|
if (!!args.options.withActions) {
|
|
@@ -96,8 +93,6 @@ _FlowRunGetCommand_instances = new WeakSet(), _FlowRunGetCommand_initOptions = f
|
|
|
96
93
|
option: '--flowName <flowName>'
|
|
97
94
|
}, {
|
|
98
95
|
option: '-e, --environmentName <environmentName>'
|
|
99
|
-
}, {
|
|
100
|
-
option: '--includeTriggerInformation'
|
|
101
96
|
}, {
|
|
102
97
|
option: '--withTrigger'
|
|
103
98
|
}, {
|
|
@@ -116,7 +111,6 @@ _FlowRunGetCommand_instances = new WeakSet(), _FlowRunGetCommand_initOptions = f
|
|
|
116
111
|
}, _FlowRunGetCommand_initTelemetry = function _FlowRunGetCommand_initTelemetry() {
|
|
117
112
|
this.telemetry.push((args) => {
|
|
118
113
|
Object.assign(this.telemetryProperties, {
|
|
119
|
-
includeTriggerInformation: !!args.options.includeTriggerInformation,
|
|
120
114
|
withTrigger: !!args.options.withTrigger,
|
|
121
115
|
withActions: typeof args.options.withActions !== 'undefined'
|
|
122
116
|
});
|
|
@@ -12,7 +12,7 @@ const options = globalOptionsZod
|
|
|
12
12
|
resourceId: zod.alias('i', z.string()),
|
|
13
13
|
resourceType: zod.alias('t', z.enum(['user', 'group', 'device', 'organization']))
|
|
14
14
|
})
|
|
15
|
-
.
|
|
15
|
+
.passthrough();
|
|
16
16
|
class GraphOpenExtensionAddCommand extends GraphCommand {
|
|
17
17
|
get name() {
|
|
18
18
|
return commands.OPENEXTENSION_ADD;
|
|
@@ -38,7 +38,7 @@ class GraphOpenExtensionAddCommand extends GraphCommand {
|
|
|
38
38
|
try {
|
|
39
39
|
const requestBody = {};
|
|
40
40
|
requestBody["extensionName"] = args.options.name;
|
|
41
|
-
const unknownOptions = optionsUtils.getUnknownOptions(args.options, this.
|
|
41
|
+
const unknownOptions = optionsUtils.getUnknownOptions(args.options, zod.schemaToOptions(this.schema));
|
|
42
42
|
const unknownOptionsNames = Object.getOwnPropertyNames(unknownOptions);
|
|
43
43
|
unknownOptionsNames.forEach(async (o) => {
|
|
44
44
|
try {
|
|
@@ -13,11 +13,10 @@ const options = globalOptionsZod
|
|
|
13
13
|
resourceType: zod.alias('t', z.enum(['user', 'group', 'device', 'organization'])),
|
|
14
14
|
keepUnchangedProperties: zod.alias('k', z.boolean().optional())
|
|
15
15
|
})
|
|
16
|
-
.
|
|
16
|
+
.passthrough();
|
|
17
17
|
class GraphOpenExtensionSetCommand extends GraphCommand {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
|
-
this.commandOptions = ['keepUnchangedProperties', 'resourceType', 'resourceId', 'name'];
|
|
21
20
|
this.defaultOpenExtensionProperties = ['id', 'extensionName'];
|
|
22
21
|
}
|
|
23
22
|
get name() {
|
|
@@ -46,12 +45,9 @@ class GraphOpenExtensionSetCommand extends GraphCommand {
|
|
|
46
45
|
const currentExtensionNames = Object.getOwnPropertyNames(currentExtension);
|
|
47
46
|
const requestBody = {};
|
|
48
47
|
requestBody["@odata.type"] = '#microsoft.graph.openTypeExtension';
|
|
49
|
-
const unknownOptions = optionsUtils.getUnknownOptions(args.options, this.
|
|
48
|
+
const unknownOptions = optionsUtils.getUnknownOptions(args.options, zod.schemaToOptions(this.schema));
|
|
50
49
|
const unknownOptionsNames = Object.getOwnPropertyNames(unknownOptions);
|
|
51
50
|
unknownOptionsNames.forEach(async (option) => {
|
|
52
|
-
if (this.commandOptions.includes(option)) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
51
|
const value = unknownOptions[option];
|
|
56
52
|
if (value === "") {
|
|
57
53
|
requestBody[option] = null;
|
|
@@ -49,7 +49,7 @@ class GraphSubscriptionAddCommand extends GraphCommand {
|
|
|
49
49
|
notificationUrl: args.options.notificationUrl,
|
|
50
50
|
expirationDateTime: await this.getExpirationDateTimeOrDefault(logger, args),
|
|
51
51
|
clientState: args.options.clientState,
|
|
52
|
-
includeResourceData: args.options.withResourceData
|
|
52
|
+
includeResourceData: args.options.withResourceData,
|
|
53
53
|
encryptionCertificate: args.options.encryptionCertificate,
|
|
54
54
|
encryptionCertificateId: args.options.encryptionCertificateId,
|
|
55
55
|
lifecycleNotificationUrl: args.options.lifecycleNotificationUrl,
|
|
@@ -66,9 +66,6 @@ class GraphSubscriptionAddCommand extends GraphCommand {
|
|
|
66
66
|
responseType: 'json'
|
|
67
67
|
};
|
|
68
68
|
try {
|
|
69
|
-
if (args.options.includeResourceData) {
|
|
70
|
-
await this.warn(logger, `Parameter 'includeResourceData' is deprecated. Please use 'withResourceData' instead`);
|
|
71
|
-
}
|
|
72
69
|
const res = await request.post(requestOptions);
|
|
73
70
|
await logger.log(res);
|
|
74
71
|
}
|
|
@@ -135,7 +132,6 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
135
132
|
lifecycleNotificationUrl: typeof args.options.lifecycleNotificationUrl !== 'undefined',
|
|
136
133
|
notificationUrlAppId: typeof args.options.notificationUrlAppId !== 'undefined',
|
|
137
134
|
latestTLSVersion: typeof args.options.latestTLSVersion !== 'undefined',
|
|
138
|
-
includeResourceData: !!args.options.includeResourceData,
|
|
139
135
|
withResourceData: !!args.options.withResourceData,
|
|
140
136
|
encryptionCertificate: typeof args.options.encryptionCertificate !== 'undefined',
|
|
141
137
|
encryptionCertificateId: typeof args.options.encryptionCertificateId !== 'undefined'
|
|
@@ -160,8 +156,6 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
160
156
|
}, {
|
|
161
157
|
option: '--latestTLSVersion [latestTLSVersion]',
|
|
162
158
|
autocomplete: this.allowedTlsVersions
|
|
163
|
-
}, {
|
|
164
|
-
option: '--includeResourceData [includeResourceData]'
|
|
165
159
|
}, {
|
|
166
160
|
option: '--withResourceData [withResourceData]'
|
|
167
161
|
}, {
|
|
@@ -193,11 +187,10 @@ _GraphSubscriptionAddCommand_instances = new WeakSet(), _GraphSubscriptionAddCom
|
|
|
193
187
|
if (args.options.latestTLSVersion && this.allowedTlsVersions.map(x => x.toLowerCase()).indexOf(args.options.latestTLSVersion.toLowerCase()) === -1) {
|
|
194
188
|
return `${args.options.latestTLSVersion} is not a valid TLS version. Allowed values are ${this.allowedTlsVersions.join(', ')}`;
|
|
195
189
|
}
|
|
196
|
-
|
|
197
|
-
if (shouldIncludeResourceData && !args.options.encryptionCertificate) {
|
|
190
|
+
if (args.options.withResourceData && !args.options.encryptionCertificate) {
|
|
198
191
|
return `The 'encryptionCertificate' options is required to include the changed resource data`;
|
|
199
192
|
}
|
|
200
|
-
if (
|
|
193
|
+
if (args.options.withResourceData && !args.options.encryptionCertificateId) {
|
|
201
194
|
return `The 'encryptionCertificateId' options is required to include the changed resource data`;
|
|
202
195
|
}
|
|
203
196
|
if (args.options.notificationUrlAppId && !validation.isValidGuid(args.options.notificationUrlAppId)) {
|
|
@@ -18,9 +18,6 @@ class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Get information about the specified copilot';
|
|
20
20
|
}
|
|
21
|
-
alias() {
|
|
22
|
-
return [commands.CHATBOT_GET];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PpCopilotGetCommand_instances.add(this);
|
|
@@ -30,7 +27,6 @@ class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
|
30
27
|
__classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initOptionSets).call(this);
|
|
31
28
|
}
|
|
32
29
|
async commandAction(logger, args) {
|
|
33
|
-
await this.showDeprecationWarning(logger, commands.CHATBOT_GET, commands.COPILOT_GET);
|
|
34
30
|
if (this.verbose) {
|
|
35
31
|
await logger.logToStderr(`Retrieving copilot '${args.options.id || args.options.name}'...`);
|
|
36
32
|
}
|
|
@@ -15,9 +15,6 @@ class PpCopilotListCommand extends PowerPlatformCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Lists Microsoft Power Platform copilots in the specified Power Platform environment';
|
|
17
17
|
}
|
|
18
|
-
alias() {
|
|
19
|
-
return [commands.CHATBOT_LIST];
|
|
20
|
-
}
|
|
21
18
|
defaultProperties() {
|
|
22
19
|
return ['name', 'botid', 'publishedOn', 'createdOn', 'botModifiedOn'];
|
|
23
20
|
}
|
|
@@ -28,7 +25,6 @@ class PpCopilotListCommand extends PowerPlatformCommand {
|
|
|
28
25
|
__classPrivateFieldGet(this, _PpCopilotListCommand_instances, "m", _PpCopilotListCommand_initOptions).call(this);
|
|
29
26
|
}
|
|
30
27
|
async commandAction(logger, args) {
|
|
31
|
-
await this.showDeprecationWarning(logger, commands.CHATBOT_LIST, commands.COPILOT_LIST);
|
|
32
28
|
if (this.verbose) {
|
|
33
29
|
await logger.logToStderr(`Retrieving list of copilots for environment '${args.options.environmentName}'.`);
|
|
34
30
|
}
|
|
@@ -18,9 +18,6 @@ class PpCopilotRemoveCommand extends PowerPlatformCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Removes the specified copilot';
|
|
20
20
|
}
|
|
21
|
-
alias() {
|
|
22
|
-
return [commands.CHATBOT_REMOVE];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PpCopilotRemoveCommand_instances.add(this);
|
|
@@ -30,7 +27,6 @@ class PpCopilotRemoveCommand extends PowerPlatformCommand {
|
|
|
30
27
|
__classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initOptionSets).call(this);
|
|
31
28
|
}
|
|
32
29
|
async commandAction(logger, args) {
|
|
33
|
-
await this.showDeprecationWarning(logger, commands.CHATBOT_REMOVE, commands.COPILOT_REMOVE);
|
|
34
30
|
if (this.verbose) {
|
|
35
31
|
await logger.logToStderr(`Removing copilot '${args.options.id || args.options.name}'...`);
|
|
36
32
|
}
|
|
@@ -25,17 +25,13 @@ class PpSolutionPublisherListCommand extends PowerPlatformCommand {
|
|
|
25
25
|
__classPrivateFieldGet(this, _PpSolutionPublisherListCommand_instances, "m", _PpSolutionPublisherListCommand_initOptions).call(this);
|
|
26
26
|
}
|
|
27
27
|
async commandAction(logger, args) {
|
|
28
|
-
if (args.options.includeMicrosoftPublishers) {
|
|
29
|
-
await this.warn(logger, `Parameter 'includeMicrosoftPublishers' is deprecated. Please use 'withMicrosoftPublishers' instead`);
|
|
30
|
-
}
|
|
31
28
|
if (this.verbose) {
|
|
32
29
|
await logger.logToStderr(`Retrieving list of publishers...`);
|
|
33
30
|
}
|
|
34
31
|
try {
|
|
35
32
|
const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
36
|
-
const shouldIncludeMicrosoftPublishers = args.options.withMicrosoftPublishers || args.options.includeMicrosoftPublishers;
|
|
37
33
|
const requestOptions = {
|
|
38
|
-
url: `${dynamicsApiUrl}/api/data/v9.0/publishers?$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix${!
|
|
34
|
+
url: `${dynamicsApiUrl}/api/data/v9.0/publishers?$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix${!args.options.withMicrosoftPublishers ? `&$filter=publisherid ne 'd21aab70-79e7-11dd-8874-00188b01e34f'` : ''}&api-version=9.1`,
|
|
39
35
|
headers: {
|
|
40
36
|
accept: 'application/json;odata.metadata=none'
|
|
41
37
|
},
|
|
@@ -52,7 +48,6 @@ class PpSolutionPublisherListCommand extends PowerPlatformCommand {
|
|
|
52
48
|
_PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherListCommand_initTelemetry = function _PpSolutionPublisherListCommand_initTelemetry() {
|
|
53
49
|
this.telemetry.push((args) => {
|
|
54
50
|
Object.assign(this.telemetryProperties, {
|
|
55
|
-
includeMicrosoftPublishers: typeof args.options.includeMicrosoftPublishers !== 'undefined',
|
|
56
51
|
withMicrosoftPublishers: typeof args.options.withMicrosoftPublishers !== 'undefined',
|
|
57
52
|
asAdmin: !!args.options.asAdmin
|
|
58
53
|
});
|
|
@@ -60,8 +55,6 @@ _PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherL
|
|
|
60
55
|
}, _PpSolutionPublisherListCommand_initOptions = function _PpSolutionPublisherListCommand_initOptions() {
|
|
61
56
|
this.options.unshift({
|
|
62
57
|
option: '-e, --environmentName <environmentName>'
|
|
63
|
-
}, {
|
|
64
|
-
option: '--includeMicrosoftPublishers'
|
|
65
58
|
}, {
|
|
66
59
|
option: '--withMicrosoftPublishers'
|
|
67
60
|
}, {
|
package/dist/m365/pp/commands.js
CHANGED
|
@@ -3,9 +3,6 @@ export default {
|
|
|
3
3
|
AIBUILDERMODEL_GET: `${prefix} aibuildermodel get`,
|
|
4
4
|
AIBUILDERMODEL_LIST: `${prefix} aibuildermodel list`,
|
|
5
5
|
AIBUILDERMODEL_REMOVE: `${prefix} aibuildermodel remove`,
|
|
6
|
-
CHATBOT_GET: `${prefix} chatbot get`,
|
|
7
|
-
CHATBOT_LIST: `${prefix} chatbot list`,
|
|
8
|
-
CHATBOT_REMOVE: `${prefix} chatbot remove`,
|
|
9
6
|
COPILOT_GET: `${prefix} copilot get`,
|
|
10
7
|
COPILOT_LIST: `${prefix} copilot list`,
|
|
11
8
|
COPILOT_REMOVE: `${prefix} copilot remove`,
|
|
@@ -24,15 +24,11 @@ class PurviewThreatAssessmentGetCommand extends GraphCommand {
|
|
|
24
24
|
}
|
|
25
25
|
async commandAction(logger, args) {
|
|
26
26
|
try {
|
|
27
|
-
if (args.options.includeResults) {
|
|
28
|
-
await this.warn(logger, `Parameter 'includeResults' is deprecated. Please use 'withResults' instead`);
|
|
29
|
-
}
|
|
30
27
|
if (this.verbose) {
|
|
31
28
|
await logger.logToStderr(`Retrieving threat assessment with id ${args.options.id}`);
|
|
32
29
|
}
|
|
33
|
-
const shouldIncludeResults = args.options.includeResults || args.options.withResults;
|
|
34
30
|
const requestOptions = {
|
|
35
|
-
url: `${this.resource}/v1.0/informationProtection/threatAssessmentRequests/${args.options.id}${
|
|
31
|
+
url: `${this.resource}/v1.0/informationProtection/threatAssessmentRequests/${args.options.id}${args.options.withResults ? '?$expand=results' : ''}`,
|
|
36
32
|
headers: {
|
|
37
33
|
accept: 'application/json;odata.metadata=none'
|
|
38
34
|
},
|
|
@@ -56,8 +52,6 @@ _PurviewThreatAssessmentGetCommand_instances = new WeakSet(), _PurviewThreatAsse
|
|
|
56
52
|
}, _PurviewThreatAssessmentGetCommand_initOptions = function _PurviewThreatAssessmentGetCommand_initOptions() {
|
|
57
53
|
this.options.unshift({
|
|
58
54
|
option: '-i, --id <id>'
|
|
59
|
-
}, {
|
|
60
|
-
option: '--includeResults'
|
|
61
55
|
}, {
|
|
62
56
|
option: '--withResults'
|
|
63
57
|
});
|
|
@@ -4,7 +4,6 @@ import { zod } from '../../../../utils/zod.js';
|
|
|
4
4
|
import commands from '../../commands.js';
|
|
5
5
|
import { validation } from '../../../../utils/validation.js';
|
|
6
6
|
import { spe } from '../../../../utils/spe.js';
|
|
7
|
-
import { spo } from '../../../../utils/spo.js';
|
|
8
7
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
8
|
import request from '../../../../request.js';
|
|
10
9
|
const options = globalOptionsZod
|
|
@@ -77,8 +76,7 @@ class SpeContainerAddCommand extends GraphCommand {
|
|
|
77
76
|
if (this.verbose) {
|
|
78
77
|
await logger.logToStderr(`Getting container type with name '${options.containerTypeName}'...`);
|
|
79
78
|
}
|
|
80
|
-
|
|
81
|
-
return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
|
|
79
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
82
80
|
}
|
|
83
81
|
}
|
|
84
82
|
export default new SpeContainerAddCommand();
|
|
@@ -10,7 +10,6 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
12
|
import { spe } from '../../../../utils/spe.js';
|
|
13
|
-
import { spo } from '../../../../utils/spo.js';
|
|
14
13
|
class SpeContainerListCommand extends GraphCommand {
|
|
15
14
|
get name() {
|
|
16
15
|
return commands.CONTAINER_LIST;
|
|
@@ -47,8 +46,7 @@ class SpeContainerListCommand extends GraphCommand {
|
|
|
47
46
|
if (options.containerTypeId) {
|
|
48
47
|
return options.containerTypeId;
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
return spe.getContainerTypeIdByName(spoAdminUrl, options.containerTypeName);
|
|
49
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
_SpeContainerListCommand_instances = new WeakSet(), _SpeContainerListCommand_initTelemetry = function _SpeContainerListCommand_initTelemetry() {
|
|
@@ -2,7 +2,6 @@ import { globalOptionsZod } from '../../../../Command.js';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import commands from '../../commands.js';
|
|
4
4
|
import { validation } from '../../../../utils/validation.js';
|
|
5
|
-
import { spo } from '../../../../utils/spo.js';
|
|
6
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
7
6
|
import { spe } from '../../../../utils/spe.js';
|
|
8
7
|
import { odata } from '../../../../utils/odata.js';
|
|
@@ -54,8 +53,7 @@ class SpeContainerRecycleBinItemListCommand extends GraphCommand {
|
|
|
54
53
|
if (this.verbose) {
|
|
55
54
|
await logger.logToStderr(`Retrieving container type id for container type '${options.containerTypeName}'...`);
|
|
56
55
|
}
|
|
57
|
-
|
|
58
|
-
return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
|
|
56
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
export default new SpeContainerRecycleBinItemListCommand();
|
|
@@ -2,7 +2,6 @@ import { globalOptionsZod } from '../../../../Command.js';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import commands from '../../commands.js';
|
|
4
4
|
import { validation } from '../../../../utils/validation.js';
|
|
5
|
-
import { spo } from '../../../../utils/spo.js';
|
|
6
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
7
6
|
import { spe } from '../../../../utils/spe.js';
|
|
8
7
|
import { odata } from '../../../../utils/odata.js';
|
|
@@ -88,8 +87,7 @@ class SpeContainerRecycleBinItemRestoreCommand extends GraphCommand {
|
|
|
88
87
|
if (this.verbose) {
|
|
89
88
|
await logger.logToStderr(`Getting container type with name '${options.containerTypeName}'...`);
|
|
90
89
|
}
|
|
91
|
-
|
|
92
|
-
return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
|
|
90
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
93
|
export default new SpeContainerRecycleBinItemRestoreCommand();
|
|
@@ -4,7 +4,6 @@ import { zod } from '../../../../utils/zod.js';
|
|
|
4
4
|
import commands from '../../commands.js';
|
|
5
5
|
import { validation } from '../../../../utils/validation.js';
|
|
6
6
|
import { spe } from '../../../../utils/spe.js';
|
|
7
|
-
import { spo } from '../../../../utils/spo.js';
|
|
8
7
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
8
|
import request from '../../../../request.js';
|
|
10
9
|
import { cli } from '../../../../cli/cli.js';
|
|
@@ -91,8 +90,7 @@ class SpeContainerRemoveCommand extends GraphCommand {
|
|
|
91
90
|
if (this.verbose) {
|
|
92
91
|
await logger.logToStderr(`Getting container type with name '${options.containerTypeName}'...`);
|
|
93
92
|
}
|
|
94
|
-
|
|
95
|
-
return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
|
|
93
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
96
94
|
}
|
|
97
95
|
}
|
|
98
96
|
export default new SpeContainerRemoveCommand();
|