@pnp/cli-microsoft365 11.4.0-beta.fe9cdb1 → 11.5.0-beta.083a680
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/.devproxy/api-specs/sharepoint.yaml +43 -0
- package/README.md +1 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +1 -1
- package/dist/AuthServer.js +2 -4
- package/dist/Command.js +2 -2
- package/dist/cli/cli.js +9 -9
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +10 -11
- package/dist/m365/app/commands/app-open.js +3 -4
- package/dist/m365/app/commands/permission/permission-add.js +4 -5
- package/dist/m365/base/AppCommand.js +3 -3
- package/dist/m365/booking/commands/business/business-get.js +6 -8
- package/dist/m365/booking/commands/business/business-list.js +2 -1
- package/dist/m365/cli/commands/app/app-add.js +5 -7
- package/dist/m365/commands/docs.js +1 -1
- package/dist/m365/commands/login.js +22 -19
- package/dist/m365/commands/logout.js +1 -1
- package/dist/m365/commands/status.js +2 -1
- package/dist/m365/connection/commands/connection-list.js +2 -1
- package/dist/m365/connection/commands/connection-set.js +15 -29
- package/dist/m365/context/commands/context-remove.js +4 -6
- package/dist/m365/context/commands/option/option-remove.js +5 -7
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +5 -7
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +7 -9
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +4 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +8 -10
- package/dist/m365/entra/commands/license/license-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-remove.js +1 -1
- package/dist/m365/entra/commands/multitenant/multitenant-add.js +3 -4
- package/dist/m365/entra/commands/organization/organization-list.js +4 -6
- package/dist/m365/entra/commands/organization/organization-set.js +24 -26
- package/dist/m365/entra/commands/roleassignment/roleassignment-add.js +21 -34
- package/dist/m365/entra/commands/roledefinition/roledefinition-add.js +8 -10
- package/dist/m365/entra/commands/roledefinition/roledefinition-get.js +11 -13
- package/dist/m365/entra/commands/roledefinition/roledefinition-list.js +5 -7
- package/dist/m365/entra/commands/roledefinition/roledefinition-remove.js +11 -13
- package/dist/m365/entra/commands/roledefinition/roledefinition-set.js +15 -17
- package/dist/m365/entra/commands/rolepermission/rolepermission-list.js +5 -7
- package/dist/m365/entra/commands/user/user-session-revoke.js +9 -13
- package/dist/m365/exo/commands/approleassignment/approleassignment-add.js +29 -31
- package/dist/m365/external/commands/item/item-add.js +1 -1
- package/dist/m365/flow/commands/environment/environment-get.js +5 -7
- package/dist/m365/flow/commands/environment/environment-list.js +2 -1
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-list.js +4 -6
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-restore.js +5 -11
- package/dist/m365/graph/commands/directoryextension/directoryextension-add.js +11 -13
- package/dist/m365/graph/commands/directoryextension/directoryextension-get.js +10 -19
- package/dist/m365/graph/commands/directoryextension/directoryextension-list.js +6 -12
- package/dist/m365/graph/commands/directoryextension/directoryextension-remove.js +11 -20
- package/dist/m365/graph/commands/openextension/openextension-add.js +12 -13
- package/dist/m365/graph/commands/openextension/openextension-get.js +12 -14
- package/dist/m365/graph/commands/openextension/openextension-list.js +11 -13
- package/dist/m365/graph/commands/openextension/openextension-remove.js +13 -15
- package/dist/m365/graph/commands/openextension/openextension-set.js +16 -17
- package/dist/m365/onedrive/commands/onedrive-list.js +2 -1
- package/dist/m365/outlook/commands/mail/mail-searchfolder-add.js +9 -14
- package/dist/m365/outlook/commands/mailbox/mailbox-settings-get.js +8 -12
- package/dist/m365/outlook/commands/mailbox/mailbox-settings-set.js +15 -15
- package/dist/m365/outlook/commands/roomlist/roomlist-list.js +2 -1
- package/dist/m365/pa/commands/environment/environment-get.js +5 -7
- package/dist/m365/pa/commands/environment/environment-list.js +2 -1
- package/dist/m365/planner/commands/tenant/tenant-settings-list.js +1 -1
- package/dist/m365/pp/commands/environment/environment-get.js +5 -7
- package/dist/m365/pp/commands/environment/environment-list.js +3 -4
- package/dist/m365/pp/commands/gateway/gateway-list.js +1 -1
- package/dist/m365/pp/commands/tenant/tenant-settings-list.js +1 -1
- package/dist/m365/pp/commands/website/website-get.js +12 -12
- package/dist/m365/purview/commands/retentionevent/retentionevent-list.js +2 -1
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-list.js +1 -1
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-list.js +1 -1
- package/dist/m365/spe/commands/container/container-add.js +10 -15
- package/dist/m365/spe/commands/container/container-permission-list.js +4 -6
- package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +5 -10
- package/dist/m365/spe/commands/container/container-recyclebinitem-remove.js +96 -0
- package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +7 -12
- package/dist/m365/spe/commands/container/container-remove.js +10 -16
- package/dist/m365/spe/commands/containertype/containertype-add.js +15 -20
- package/dist/m365/spe/commands/containertype/containertype-get.js +6 -13
- package/dist/m365/spe/commands/containertype/containertype-remove.js +7 -14
- package/dist/m365/spe/commands.js +1 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.22.2.js +21 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/DependencyRule.js +56 -14
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.22.2.js +55 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +7 -8
- package/dist/m365/spfx/commands/spfx-doctor.js +23 -8
- package/dist/m365/spo/commands/file/file-add.js +49 -11
- package/dist/m365/spo/commands/file/file-version-keep.js +10 -14
- package/dist/m365/spo/commands/homesite/homesite-add.js +13 -15
- package/dist/m365/spo/commands/homesite/homesite-get.js +8 -9
- package/dist/m365/spo/commands/homesite/homesite-remove.js +9 -10
- package/dist/m365/spo/commands/homesite/homesite-set.js +13 -14
- package/dist/m365/spo/commands/list/DefaultColumnValue.js +2 -0
- package/dist/m365/spo/commands/list/list-defaultvalue-clear.js +13 -17
- package/dist/m365/spo/commands/list/list-defaultvalue-get.js +124 -0
- package/dist/m365/spo/commands/list/list-defaultvalue-list.js +13 -37
- package/dist/m365/spo/commands/list/list-defaultvalue-remove.js +12 -16
- package/dist/m365/spo/commands/list/list-defaultvalue-set.js +11 -15
- package/dist/m365/spo/commands/list/list-view-add.js +16 -20
- package/dist/m365/spo/commands/listitem/listitem-set.js +1 -1
- package/dist/m365/spo/commands/page/page-control-remove.js +11 -15
- package/dist/m365/spo/commands/page/page-get.js +10 -11
- package/dist/m365/spo/commands/page/page-header-set.js +97 -89
- package/dist/m365/spo/commands/page/page-publish.js +9 -10
- package/dist/m365/spo/commands/page/page-section-remove.js +11 -12
- package/dist/m365/spo/commands/page/page-set.js +26 -26
- package/dist/m365/spo/commands/site/site-appcatalog-list.js +4 -6
- package/dist/m365/spo/commands/site/site-get.js +6 -8
- package/dist/m365/spo/commands/site/site-sharingpermission-set.js +7 -9
- package/dist/m365/spo/commands/site/site-versionpolicy-get.js +11 -13
- package/dist/m365/spo/commands/web/web-alert-list.js +20 -27
- package/dist/m365/spo/commands/web/web-alert-remove.js +15 -20
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/spp/commands/autofillcolumn/autofillcolumn-set.js +166 -0
- package/dist/m365/spp/commands/model/model-apply.js +18 -24
- package/dist/m365/spp/commands.js +1 -0
- package/dist/m365/teams/commands/callrecord/callrecord-list.js +5 -9
- package/dist/m365/teams/commands/chat/chat-message-list.js +26 -27
- package/dist/m365/teams/commands/chat/chat-message-send.js +12 -3
- package/dist/m365/teams/commands/chat/chatUtil.js +1 -1
- package/dist/m365/tenant/commands/people/people-pronouns-set.js +4 -6
- package/dist/m365/tenant/commands/report/report-settings-set.js +4 -6
- package/dist/m365/viva/commands/engage/engage-community-user-add.js +17 -22
- package/dist/m365/viva/commands/engage/engage-community-user-list.js +8 -14
- package/dist/m365/viva/commands/engage/engage-community-user-remove.js +14 -22
- package/dist/m365/viva/commands/engage/engage-role-member-list.js +6 -11
- package/dist/utils/spo.js +30 -2
- package/dist/utils/zod.js +41 -76
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +19 -0
- package/docs/docs/cmd/entra/app/app-permission-list.mdx +19 -0
- package/docs/docs/cmd/entra/app/app-permission-remove.mdx +21 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-remove.mdx +79 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-add.mdx +140 -1
- package/docs/docs/cmd/spo/list/list-defaultvalue-get.mdx +118 -0
- package/docs/docs/cmd/spo/page/page-header-set.mdx +28 -8
- package/docs/docs/cmd/spo/page/page-set.mdx +35 -5
- package/docs/docs/cmd/spp/autofillcolumn/autofillcolumn-set.mdx +104 -0
- package/docs/docs/cmd/teams/chat/chat-message-list.mdx +34 -7
- package/docs/docs/cmd/teams/chat/chat-message-send.mdx +23 -1
- package/eslint.config.mjs +1 -0
- package/npm-shrinkwrap.json +721 -1647
- package/package.json +28 -20
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
-
import { zod } from '../../../../utils/zod.js';
|
|
4
3
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
5
4
|
import commands from '../../commands.js';
|
|
6
|
-
import { validation } from '../../../../utils/validation.js';
|
|
7
5
|
import { vivaEngage } from '../../../../utils/vivaEngage.js';
|
|
8
6
|
import { odata } from '../../../../utils/odata.js';
|
|
9
|
-
const options =
|
|
10
|
-
.
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
11
9
|
communityId: z.string().optional(),
|
|
12
|
-
communityDisplayName:
|
|
13
|
-
entraGroupId: z.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})).optional(),
|
|
17
|
-
role: zod.alias('r', z.enum(['Admin', 'Member']).optional())
|
|
18
|
-
})
|
|
19
|
-
.strict();
|
|
10
|
+
communityDisplayName: z.string().optional().alias('n'),
|
|
11
|
+
entraGroupId: z.uuid().optional(),
|
|
12
|
+
role: z.enum(['Admin', 'Member']).optional().alias('r')
|
|
13
|
+
});
|
|
20
14
|
class VivaEngageCommunityUserListCommand extends GraphCommand {
|
|
21
15
|
get name() {
|
|
22
16
|
return commands.ENGAGE_COMMUNITY_USER_LIST;
|
|
@@ -30,10 +24,10 @@ class VivaEngageCommunityUserListCommand extends GraphCommand {
|
|
|
30
24
|
getRefinedSchema(schema) {
|
|
31
25
|
return schema
|
|
32
26
|
.refine(options => [options.communityId, options.communityDisplayName, options.entraGroupId].filter(x => x !== undefined).length === 1, {
|
|
33
|
-
|
|
27
|
+
error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.'
|
|
34
28
|
})
|
|
35
29
|
.refine(options => options.communityId || options.communityDisplayName || options.entraGroupId, {
|
|
36
|
-
|
|
30
|
+
error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.'
|
|
37
31
|
});
|
|
38
32
|
}
|
|
39
33
|
defaultProperties() {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
-
import { zod } from '../../../../utils/zod.js';
|
|
4
3
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
5
4
|
import commands from '../../commands.js';
|
|
6
5
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -8,25 +7,18 @@ import { vivaEngage } from '../../../../utils/vivaEngage.js';
|
|
|
8
7
|
import request from '../../../../request.js';
|
|
9
8
|
import { entraUser } from '../../../../utils/entraUser.js';
|
|
10
9
|
import { cli } from '../../../../cli/cli.js';
|
|
11
|
-
const options =
|
|
12
|
-
.
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
13
12
|
communityId: z.string().optional(),
|
|
14
|
-
communityDisplayName:
|
|
15
|
-
entraGroupId: z.
|
|
16
|
-
|
|
17
|
-
message: `'${id}' is not a valid GUID.`
|
|
18
|
-
})).optional(),
|
|
19
|
-
id: z.string()
|
|
20
|
-
.refine(id => validation.isValidGuid(id), id => ({
|
|
21
|
-
message: `'${id}' is not a valid GUID.`
|
|
22
|
-
})).optional(),
|
|
13
|
+
communityDisplayName: z.string().optional().alias('n'),
|
|
14
|
+
entraGroupId: z.uuid().optional(),
|
|
15
|
+
id: z.uuid().optional(),
|
|
23
16
|
userName: z.string()
|
|
24
|
-
.refine(userName => validation.isValidUserPrincipalName(userName),
|
|
25
|
-
|
|
26
|
-
})
|
|
17
|
+
.refine(userName => validation.isValidUserPrincipalName(userName), {
|
|
18
|
+
error: e => `'${e.input}' is not a valid user principal name.`
|
|
19
|
+
}).optional(),
|
|
27
20
|
force: z.boolean().optional()
|
|
28
|
-
})
|
|
29
|
-
.strict();
|
|
21
|
+
});
|
|
30
22
|
class VivaEngageCommunityUserRemoveCommand extends GraphCommand {
|
|
31
23
|
get name() {
|
|
32
24
|
return commands.ENGAGE_COMMUNITY_USER_REMOVE;
|
|
@@ -40,16 +32,16 @@ class VivaEngageCommunityUserRemoveCommand extends GraphCommand {
|
|
|
40
32
|
getRefinedSchema(schema) {
|
|
41
33
|
return schema
|
|
42
34
|
.refine(options => [options.communityId, options.communityDisplayName, options.entraGroupId].filter(x => x !== undefined).length === 1, {
|
|
43
|
-
|
|
35
|
+
error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.'
|
|
44
36
|
})
|
|
45
37
|
.refine(options => options.communityId || options.communityDisplayName || options.entraGroupId, {
|
|
46
|
-
|
|
38
|
+
error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.'
|
|
47
39
|
})
|
|
48
40
|
.refine(options => options.id || options.userName, {
|
|
49
|
-
|
|
41
|
+
error: 'Specify either of id or userName.'
|
|
50
42
|
})
|
|
51
|
-
.refine(options => options.userName !== undefined || options.id !== undefined, {
|
|
52
|
-
|
|
43
|
+
.refine(options => typeof options.userName !== 'undefined' || typeof options.id !== 'undefined', {
|
|
44
|
+
error: 'Specify either id or userName, but not both.'
|
|
53
45
|
});
|
|
54
46
|
}
|
|
55
47
|
async commandAction(logger, args) {
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
-
import { zod } from '../../../../utils/zod.js';
|
|
4
3
|
import { odata } from '../../../../utils/odata.js';
|
|
5
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
6
5
|
import commands from '../../commands.js';
|
|
7
|
-
import { validation } from '../../../../utils/validation.js';
|
|
8
6
|
import { vivaEngage } from '../../../../utils/vivaEngage.js';
|
|
9
|
-
const options =
|
|
10
|
-
.
|
|
11
|
-
roleId:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
roleName: zod.alias('n', z.string().optional())
|
|
15
|
-
})
|
|
16
|
-
.strict();
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
roleId: z.uuid().optional().alias('i'),
|
|
10
|
+
roleName: z.string().optional().alias('n')
|
|
11
|
+
});
|
|
17
12
|
class VivaEngageRoleMemberListCommand extends GraphCommand {
|
|
18
13
|
get name() {
|
|
19
14
|
return commands.ENGAGE_ROLE_MEMBER_LIST;
|
|
@@ -27,7 +22,7 @@ class VivaEngageRoleMemberListCommand extends GraphCommand {
|
|
|
27
22
|
getRefinedSchema(schema) {
|
|
28
23
|
return schema
|
|
29
24
|
.refine(options => [options.roleId, options.roleName].filter(x => x !== undefined).length === 1, {
|
|
30
|
-
|
|
25
|
+
error: 'Specify either roleId, or roleName, but not both.'
|
|
31
26
|
});
|
|
32
27
|
}
|
|
33
28
|
defaultProperties() {
|
package/dist/utils/spo.js
CHANGED
|
@@ -11,6 +11,7 @@ import { RoleType } from '../m365/spo/commands/roledefinition/RoleType.js';
|
|
|
11
11
|
import { entraGroup } from './entraGroup.js';
|
|
12
12
|
import { SharingCapabilities } from '../m365/spo/commands/site/SharingCapabilities.js';
|
|
13
13
|
import { timersUtil } from './timersUtil.js';
|
|
14
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
14
15
|
export var CreateFileCopyJobsNameConflictBehavior;
|
|
15
16
|
(function (CreateFileCopyJobsNameConflictBehavior) {
|
|
16
17
|
CreateFileCopyJobsNameConflictBehavior[CreateFileCopyJobsNameConflictBehavior["Fail"] = 0] = "Fail";
|
|
@@ -1306,9 +1307,8 @@ export const spo = {
|
|
|
1306
1307
|
if (response.indexOf("ErrorMessage") > -1) {
|
|
1307
1308
|
throw `Error occurred in systemUpdate operation - ${response}`;
|
|
1308
1309
|
}
|
|
1309
|
-
const id = Number(itemId);
|
|
1310
1310
|
const requestOptionsItems = {
|
|
1311
|
-
url: `${absoluteListUrl}/items(${
|
|
1311
|
+
url: `${absoluteListUrl}/items(${itemId})`,
|
|
1312
1312
|
headers: {
|
|
1313
1313
|
'accept': 'application/json;odata=nometadata'
|
|
1314
1314
|
},
|
|
@@ -1847,6 +1847,34 @@ export const spo = {
|
|
|
1847
1847
|
roleDefinition.BasePermissionsValue = permissions.parse();
|
|
1848
1848
|
roleDefinition.RoleTypeKindValue = RoleType[roleDefinition.RoleTypeKind];
|
|
1849
1849
|
return roleDefinition;
|
|
1850
|
+
},
|
|
1851
|
+
/**
|
|
1852
|
+
* Converts SharePoint default column values XML to a structured JSON array.
|
|
1853
|
+
* Parses the XML content from client_LocationBasedDefaults.html file and extracts
|
|
1854
|
+
* default field values configured for folders in a SharePoint document library.
|
|
1855
|
+
*
|
|
1856
|
+
* @param xml The XML string containing default column value definitions
|
|
1857
|
+
* @returns An array of default column values with field names, values, and associated folder URLs
|
|
1858
|
+
*/
|
|
1859
|
+
convertDefaultColumnXmlToJson(xml) {
|
|
1860
|
+
const results = [];
|
|
1861
|
+
const parser = new DOMParser();
|
|
1862
|
+
const doc = parser.parseFromString(xml, 'application/xml');
|
|
1863
|
+
const folderLinks = doc.getElementsByTagName('a');
|
|
1864
|
+
for (let i = 0; i < folderLinks.length; i++) {
|
|
1865
|
+
const folderUrl = folderLinks[i].getAttribute('href');
|
|
1866
|
+
const defaultValues = folderLinks[i].getElementsByTagName('DefaultValue');
|
|
1867
|
+
for (let j = 0; j < defaultValues.length; j++) {
|
|
1868
|
+
const fieldName = defaultValues[j].getAttribute('FieldName');
|
|
1869
|
+
const fieldValue = defaultValues[j].textContent;
|
|
1870
|
+
results.push({
|
|
1871
|
+
fieldName: fieldName,
|
|
1872
|
+
fieldValue: fieldValue,
|
|
1873
|
+
folderUrl: decodeURIComponent(folderUrl)
|
|
1874
|
+
});
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
return results;
|
|
1850
1878
|
}
|
|
1851
1879
|
};
|
|
1852
1880
|
//# sourceMappingURL=spo.js.map
|
package/dist/utils/zod.js
CHANGED
|
@@ -1,114 +1,74 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (def.right._def.typeName !== z.ZodFirstPartyTypeKind.ZodAny) {
|
|
10
|
-
return def.right._def;
|
|
11
|
-
}
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
function parseObject(def, options, _currentOption) {
|
|
15
|
-
const properties = def.shape();
|
|
16
|
-
for (const key in properties) {
|
|
17
|
-
const property = properties[key];
|
|
2
|
+
z.ZodType.prototype.alias = function (name) {
|
|
3
|
+
this.def.alias = name;
|
|
4
|
+
return this;
|
|
5
|
+
};
|
|
6
|
+
function parseObject(schema, options, _currentOption) {
|
|
7
|
+
for (const key in schema.properties) {
|
|
8
|
+
const property = schema.properties[key];
|
|
18
9
|
const option = {
|
|
19
10
|
name: key,
|
|
20
11
|
long: key,
|
|
21
|
-
short: property
|
|
22
|
-
required:
|
|
12
|
+
short: property['x-alias'],
|
|
13
|
+
required: schema.required?.includes(key) && property.default === undefined || false,
|
|
23
14
|
type: 'string'
|
|
24
15
|
};
|
|
25
|
-
|
|
16
|
+
parseJSONSchema(property, options, option);
|
|
26
17
|
options.push(option);
|
|
27
18
|
}
|
|
28
19
|
return;
|
|
29
20
|
}
|
|
30
|
-
function parseString(
|
|
21
|
+
function parseString(schema, _options, currentOption) {
|
|
31
22
|
if (currentOption) {
|
|
32
23
|
currentOption.type = 'string';
|
|
24
|
+
if (schema.enum) {
|
|
25
|
+
currentOption.autocomplete = schema.enum.map(e => String(e));
|
|
26
|
+
}
|
|
33
27
|
}
|
|
34
28
|
return;
|
|
35
29
|
}
|
|
36
|
-
function parseNumber(
|
|
30
|
+
function parseNumber(schema, _options, currentOption) {
|
|
37
31
|
if (currentOption) {
|
|
38
32
|
currentOption.type = 'number';
|
|
39
33
|
}
|
|
40
34
|
return;
|
|
41
35
|
}
|
|
42
|
-
function parseBoolean(
|
|
36
|
+
function parseBoolean(schema, _options, currentOption) {
|
|
43
37
|
if (currentOption) {
|
|
44
38
|
currentOption.type = 'boolean';
|
|
45
39
|
}
|
|
46
40
|
return;
|
|
47
41
|
}
|
|
48
|
-
function parseOptional(def, _options, currentOption) {
|
|
49
|
-
if (currentOption) {
|
|
50
|
-
currentOption.required = false;
|
|
51
|
-
}
|
|
52
|
-
return def.innerType._def;
|
|
53
|
-
}
|
|
54
|
-
function parseDefault(def, _options, currentOption) {
|
|
55
|
-
if (currentOption) {
|
|
56
|
-
currentOption.required = false;
|
|
57
|
-
}
|
|
58
|
-
return def.innerType._def;
|
|
59
|
-
}
|
|
60
|
-
function parseEnum(def, _options, currentOption) {
|
|
61
|
-
if (currentOption) {
|
|
62
|
-
currentOption.type = 'string';
|
|
63
|
-
currentOption.autocomplete = [...def.values];
|
|
64
|
-
}
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
function parseNativeEnum(def, _options, currentOption) {
|
|
68
|
-
if (currentOption) {
|
|
69
|
-
currentOption.type = 'string';
|
|
70
|
-
currentOption.autocomplete = Object.values(def.values).map(v => String(v));
|
|
71
|
-
}
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
42
|
function getParseFn(typeName) {
|
|
75
43
|
switch (typeName) {
|
|
76
|
-
case
|
|
77
|
-
return parseEffect;
|
|
78
|
-
case z.ZodFirstPartyTypeKind.ZodObject:
|
|
44
|
+
case 'object':
|
|
79
45
|
return parseObject;
|
|
80
|
-
case
|
|
81
|
-
return parseOptional;
|
|
82
|
-
case z.ZodFirstPartyTypeKind.ZodString:
|
|
46
|
+
case 'string':
|
|
83
47
|
return parseString;
|
|
84
|
-
case
|
|
48
|
+
case 'number':
|
|
49
|
+
case 'integer':
|
|
85
50
|
return parseNumber;
|
|
86
|
-
case
|
|
51
|
+
case 'boolean':
|
|
87
52
|
return parseBoolean;
|
|
88
|
-
case z.ZodFirstPartyTypeKind.ZodEnum:
|
|
89
|
-
return parseEnum;
|
|
90
|
-
case z.ZodFirstPartyTypeKind.ZodNativeEnum:
|
|
91
|
-
return parseNativeEnum;
|
|
92
|
-
case z.ZodFirstPartyTypeKind.ZodDefault:
|
|
93
|
-
return parseDefault;
|
|
94
|
-
case z.ZodFirstPartyTypeKind.ZodIntersection:
|
|
95
|
-
return parseIntersection;
|
|
96
53
|
default:
|
|
97
54
|
return;
|
|
98
55
|
}
|
|
99
56
|
}
|
|
100
|
-
function
|
|
101
|
-
let
|
|
57
|
+
function parseJSONSchema(jsonSchema, options, currentOption) {
|
|
58
|
+
let parsedSchema = jsonSchema;
|
|
102
59
|
do {
|
|
103
|
-
|
|
60
|
+
if (parsedSchema.allOf) {
|
|
61
|
+
parsedSchema.allOf.forEach(s => parseJSONSchema(s, options, currentOption));
|
|
62
|
+
}
|
|
63
|
+
const parse = getParseFn(parsedSchema.type);
|
|
104
64
|
if (!parse) {
|
|
105
65
|
break;
|
|
106
66
|
}
|
|
107
|
-
|
|
108
|
-
if (!
|
|
67
|
+
parsedSchema = parse(parsedSchema, options, currentOption);
|
|
68
|
+
if (!parsedSchema) {
|
|
109
69
|
break;
|
|
110
70
|
}
|
|
111
|
-
} while (
|
|
71
|
+
} while (parsedSchema);
|
|
112
72
|
}
|
|
113
73
|
function optionToString(optionInfo) {
|
|
114
74
|
let s = '';
|
|
@@ -126,13 +86,18 @@ function optionToString(optionInfo) {
|
|
|
126
86
|
}
|
|
127
87
|
;
|
|
128
88
|
export const zod = {
|
|
129
|
-
alias(alias, type) {
|
|
130
|
-
type._def.alias = alias;
|
|
131
|
-
return type;
|
|
132
|
-
},
|
|
133
89
|
schemaToOptionInfo(schema) {
|
|
90
|
+
const jsonSchema = z.toJSONSchema(schema, {
|
|
91
|
+
override: s => {
|
|
92
|
+
const alias = s.zodSchema.def.alias;
|
|
93
|
+
if (alias) {
|
|
94
|
+
s.jsonSchema['x-alias'] = alias;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
unrepresentable: 'any'
|
|
98
|
+
});
|
|
134
99
|
const options = [];
|
|
135
|
-
|
|
100
|
+
parseJSONSchema(jsonSchema, options);
|
|
136
101
|
return options;
|
|
137
102
|
},
|
|
138
103
|
schemaToOptions(schema) {
|
|
@@ -153,6 +118,6 @@ export const zod = {
|
|
|
153
118
|
}
|
|
154
119
|
}
|
|
155
120
|
return null;
|
|
156
|
-
}, z.
|
|
121
|
+
}, z.enum(e))
|
|
157
122
|
};
|
|
158
123
|
//# sourceMappingURL=zod.js.map
|
|
@@ -46,6 +46,25 @@ m365 entra appregistration permission add [options]
|
|
|
46
46
|
|
|
47
47
|
Scopes/Roles to grant must be fully-qualified so that we can disambiguate them between the different resources.
|
|
48
48
|
|
|
49
|
+
## Permissions
|
|
50
|
+
|
|
51
|
+
<Tabs>
|
|
52
|
+
<TabItem value="Delegated">
|
|
53
|
+
|
|
54
|
+
| Resource | Permissions |
|
|
55
|
+
|------------------|---------------------------|
|
|
56
|
+
| Microsoft Graph | Application.ReadWrite.All |
|
|
57
|
+
|
|
58
|
+
</TabItem>
|
|
59
|
+
<TabItem value="Application">
|
|
60
|
+
|
|
61
|
+
| Resource | Permissions |
|
|
62
|
+
|------------------|---------------------------|
|
|
63
|
+
| Microsoft Graph | Application.ReadWrite.All |
|
|
64
|
+
|
|
65
|
+
</TabItem>
|
|
66
|
+
</Tabs>
|
|
67
|
+
|
|
49
68
|
## Examples
|
|
50
69
|
|
|
51
70
|
Grant multiple delegated API permissions to a Microsoft Entra app specified by client id.
|
|
@@ -34,6 +34,25 @@ m365 entra app permission list [options]
|
|
|
34
34
|
|
|
35
35
|
For best performance use the `objectId` option to reference the Entra application registration to get. If you use `appId`, this command will first need to find the corresponding object ID for that application.
|
|
36
36
|
|
|
37
|
+
## Permissions
|
|
38
|
+
|
|
39
|
+
<Tabs>
|
|
40
|
+
<TabItem value="Delegated">
|
|
41
|
+
|
|
42
|
+
| Resource | Permissions |
|
|
43
|
+
|------------------|----------------------|
|
|
44
|
+
| Microsoft Graph | Application.Read.All |
|
|
45
|
+
|
|
46
|
+
</TabItem>
|
|
47
|
+
<TabItem value="Application">
|
|
48
|
+
|
|
49
|
+
| Resource | Permissions |
|
|
50
|
+
|------------------|----------------------|
|
|
51
|
+
| Microsoft Graph | Application.Read.All |
|
|
52
|
+
|
|
53
|
+
</TabItem>
|
|
54
|
+
</Tabs>
|
|
55
|
+
|
|
37
56
|
## Examples
|
|
38
57
|
|
|
39
58
|
Retrieves all permissions for an Entra application registration specified by client id.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# entra app permission remove
|
|
4
6
|
|
|
@@ -41,6 +43,25 @@ m365 entra app permission remove [options]
|
|
|
41
43
|
|
|
42
44
|
Removing permissions on App Registrations does not immediately remove consent given by an administrator. Explicitly instruct the CLI to revoke consent by using the `--revokeAdminConsent` flag.
|
|
43
45
|
|
|
46
|
+
## Permissions
|
|
47
|
+
|
|
48
|
+
<Tabs>
|
|
49
|
+
<TabItem value="Delegated">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|------------------|---------------------------|
|
|
53
|
+
| Microsoft Graph | Application.ReadWrite.All |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
<TabItem value="Application">
|
|
57
|
+
|
|
58
|
+
| Resource | Permissions |
|
|
59
|
+
|------------------|---------------------------|
|
|
60
|
+
| Microsoft Graph | Application.ReadWrite.All |
|
|
61
|
+
|
|
62
|
+
</TabItem>
|
|
63
|
+
</Tabs>
|
|
64
|
+
|
|
44
65
|
## Examples
|
|
45
66
|
|
|
46
67
|
Remove multiple delegated API permissions from an Entra app registration
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spe container recyclebinitem remove
|
|
6
|
+
|
|
7
|
+
Permanently removes a container from the recycle bin
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spe container recyclebinitem remove [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --id [id]`
|
|
19
|
+
: The container id. Specify either `id` or `name` but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --name [name]`
|
|
22
|
+
: The display name of the Container. Specify either `id` or `name` but not both.
|
|
23
|
+
|
|
24
|
+
`--containerTypeId [containerTypeId]`
|
|
25
|
+
: The container type ID of the container instance. Use either `containerTypeId` or `containerTypeName` but not both.
|
|
26
|
+
|
|
27
|
+
`--containerTypeName [containerTypeName]`
|
|
28
|
+
: The container type name of the container instance. Use either `containerTypeId` or `containerTypeName` but not both.
|
|
29
|
+
|
|
30
|
+
`-f, --force`
|
|
31
|
+
: Don't prompt for confirmation.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<Global />
|
|
35
|
+
|
|
36
|
+
## Permissions
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="Delegated">
|
|
40
|
+
|
|
41
|
+
| Resource | Permissions |
|
|
42
|
+
|-----------------|--------------------------------------------------------------------|
|
|
43
|
+
| Microsoft Graph | FileStorageContainer.Selected, FileStorageContainerType.Manage.All |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Application">
|
|
47
|
+
|
|
48
|
+
This command only supports application permissions when using the `containerTypeId` option.
|
|
49
|
+
|
|
50
|
+
| Resource | Permissions |
|
|
51
|
+
|-----------------|-------------------------------|
|
|
52
|
+
| Microsoft Graph | FileStorageContainer.Selected |
|
|
53
|
+
|
|
54
|
+
</TabItem>
|
|
55
|
+
</Tabs>
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
Remove a deleted container by ID.
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
m365 spe container recyclebinitem remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Remove a deleted container by using its name and container type ID.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
m365 spe container recyclebinitem remove --containerTypeId "91710488-5756-407f-9046-fbe5f0b4de73" --name "Invoices"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Remove a deleted container by using its name and container type name.
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
m365 spe container recyclebinitem remove --containerTypeName "My container type name" --name "Invoices"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Response
|
|
78
|
+
|
|
79
|
+
The command won't return a response on success.
|
|
@@ -45,7 +45,7 @@ m365 spfx project upgrade [options]
|
|
|
45
45
|
|
|
46
46
|
## Remarks
|
|
47
47
|
|
|
48
|
-
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.
|
|
48
|
+
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.22.2).
|
|
49
49
|
|
|
50
50
|
This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
|
|
51
51
|
|