@pnp/cli-microsoft365 11.4.0-beta.13d597c → 11.4.0-beta.40f818c
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/AuthServer.js +2 -4
- package/dist/Command.js +2 -2
- package/dist/cli/cli.js +8 -8
- 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 +17 -18
- 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/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/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-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/spfx/commands/project/project-upgrade.js +4 -6
- 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/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-publish.js +9 -10
- package/dist/m365/spo/commands/page/page-section-remove.js +11 -12
- 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/model/model-apply.js +18 -24
- 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 +29 -0
- 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/spo/list/list-defaultvalue-get.mdx +118 -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/npm-shrinkwrap.json +274 -248
- package/package.json +11 -11
|
@@ -3,12 +3,10 @@ import GraphCommand from '../../../base/GraphCommand.js';
|
|
|
3
3
|
import commands from '../../commands.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { globalOptionsZod } from '../../../../Command.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
})
|
|
11
|
-
.strict();
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
displayConcealedNames: z.boolean().alias('d')
|
|
9
|
+
});
|
|
12
10
|
class TenantReportSettingsSetCommand extends GraphCommand {
|
|
13
11
|
get name() {
|
|
14
12
|
return commands.REPORT_SETTINGS_SET;
|
|
@@ -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,21 @@ import { vivaEngage } from '../../../../utils/vivaEngage.js';
|
|
|
8
7
|
import request from '../../../../request.js';
|
|
9
8
|
import { entraUser } from '../../../../utils/entraUser.js';
|
|
10
9
|
import { formatting } from '../../../../utils/formatting.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
|
-
.refine(id => validation.isValidGuid(id), id => ({
|
|
17
|
-
message: `'${id}' is not a valid GUID.`
|
|
18
|
-
})).optional(),
|
|
13
|
+
communityDisplayName: z.string().optional().alias('n'),
|
|
14
|
+
entraGroupId: z.uuid().optional(),
|
|
19
15
|
ids: z.string()
|
|
20
|
-
.refine(ids => validation.isValidGuidArray(ids) === true,
|
|
21
|
-
|
|
22
|
-
})
|
|
16
|
+
.refine(ids => validation.isValidGuidArray(ids) === true, {
|
|
17
|
+
error: e => `The following GUIDs are invalid: ${e.input}.`
|
|
18
|
+
}).optional(),
|
|
23
19
|
userNames: z.string()
|
|
24
|
-
.refine(userNames => validation.isValidUserPrincipalNameArray(userNames) === true,
|
|
25
|
-
|
|
26
|
-
})
|
|
27
|
-
role:
|
|
28
|
-
})
|
|
29
|
-
.strict();
|
|
20
|
+
.refine(userNames => validation.isValidUserPrincipalNameArray(userNames) === true, {
|
|
21
|
+
error: e => `The following user principal names are invalid: ${e.input}.`
|
|
22
|
+
}).optional(),
|
|
23
|
+
role: z.enum(['Admin', 'Member']).alias('r')
|
|
24
|
+
});
|
|
30
25
|
class VivaEngageCommunityUserAddCommand extends GraphCommand {
|
|
31
26
|
get name() {
|
|
32
27
|
return commands.ENGAGE_COMMUNITY_USER_ADD;
|
|
@@ -40,16 +35,16 @@ class VivaEngageCommunityUserAddCommand extends GraphCommand {
|
|
|
40
35
|
getRefinedSchema(schema) {
|
|
41
36
|
return schema
|
|
42
37
|
.refine(options => [options.communityId, options.communityDisplayName, options.entraGroupId].filter(x => x !== undefined).length === 1, {
|
|
43
|
-
|
|
38
|
+
error: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.'
|
|
44
39
|
})
|
|
45
40
|
.refine(options => options.communityId || options.communityDisplayName || options.entraGroupId, {
|
|
46
|
-
|
|
41
|
+
error: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.'
|
|
47
42
|
})
|
|
48
43
|
.refine(options => options.ids || options.userNames, {
|
|
49
|
-
|
|
44
|
+
error: 'Specify either of ids or userNames.'
|
|
50
45
|
})
|
|
51
|
-
.refine(options => options.userNames !== undefined || options.ids !== undefined, {
|
|
52
|
-
|
|
46
|
+
.refine(options => typeof options.userNames !== 'undefined' || typeof options.ids !== 'undefined', {
|
|
47
|
+
error: 'Specify either ids or userNames, but not both.'
|
|
53
48
|
});
|
|
54
49
|
}
|
|
55
50
|
async commandAction(logger, args) {
|
|
@@ -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";
|
|
@@ -1847,6 +1848,34 @@ export const spo = {
|
|
|
1847
1848
|
roleDefinition.BasePermissionsValue = permissions.parse();
|
|
1848
1849
|
roleDefinition.RoleTypeKindValue = RoleType[roleDefinition.RoleTypeKind];
|
|
1849
1850
|
return roleDefinition;
|
|
1851
|
+
},
|
|
1852
|
+
/**
|
|
1853
|
+
* Converts SharePoint default column values XML to a structured JSON array.
|
|
1854
|
+
* Parses the XML content from client_LocationBasedDefaults.html file and extracts
|
|
1855
|
+
* default field values configured for folders in a SharePoint document library.
|
|
1856
|
+
*
|
|
1857
|
+
* @param xml The XML string containing default column value definitions
|
|
1858
|
+
* @returns An array of default column values with field names, values, and associated folder URLs
|
|
1859
|
+
*/
|
|
1860
|
+
convertDefaultColumnXmlToJson(xml) {
|
|
1861
|
+
const results = [];
|
|
1862
|
+
const parser = new DOMParser();
|
|
1863
|
+
const doc = parser.parseFromString(xml, 'application/xml');
|
|
1864
|
+
const folderLinks = doc.getElementsByTagName('a');
|
|
1865
|
+
for (let i = 0; i < folderLinks.length; i++) {
|
|
1866
|
+
const folderUrl = folderLinks[i].getAttribute('href');
|
|
1867
|
+
const defaultValues = folderLinks[i].getElementsByTagName('DefaultValue');
|
|
1868
|
+
for (let j = 0; j < defaultValues.length; j++) {
|
|
1869
|
+
const fieldName = defaultValues[j].getAttribute('FieldName');
|
|
1870
|
+
const fieldValue = defaultValues[j].textContent;
|
|
1871
|
+
results.push({
|
|
1872
|
+
fieldName: fieldName,
|
|
1873
|
+
fieldValue: fieldValue,
|
|
1874
|
+
folderUrl: decodeURIComponent(folderUrl)
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
return results;
|
|
1850
1879
|
}
|
|
1851
1880
|
};
|
|
1852
1881
|
//# 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,118 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo list defaultvalue get
|
|
6
|
+
|
|
7
|
+
Gets a specific default column value from a specific document library
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo list defaultvalue get [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
|
+
: URL of the site where the list is located.
|
|
20
|
+
|
|
21
|
+
`-i, --listId [listId]`
|
|
22
|
+
: ID of the list. Specify either `listTitle`, `listId`, or `listUrl`.
|
|
23
|
+
|
|
24
|
+
`-t, --listTitle [listTitle]`
|
|
25
|
+
: Title of the list. Specify either `listTitle`, `listId`, or `listUrl`.
|
|
26
|
+
|
|
27
|
+
`--listUrl [listUrl]`
|
|
28
|
+
: Server- or site-relative URL of the list. Specify either `listTitle`, `listId`, or `listUrl`.
|
|
29
|
+
|
|
30
|
+
`--fieldName <fieldName>`
|
|
31
|
+
: Internal name of the field.
|
|
32
|
+
|
|
33
|
+
`--folderUrl [folderUrl]`
|
|
34
|
+
: Get a specific field of a specific folder by specifying a server- or site-relative URL.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
<Global />
|
|
38
|
+
|
|
39
|
+
## Permissions
|
|
40
|
+
|
|
41
|
+
<Tabs>
|
|
42
|
+
<TabItem value="Delegated">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|------------|---------------|
|
|
46
|
+
| SharePoint | AllSites.Read |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
<TabItem value="Application">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|------------|----------------|
|
|
53
|
+
| SharePoint | Sites.Read.All |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
</Tabs>
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
Get default column value from the root folder of the list
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 spo list defaultvalue get --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Company
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Get default column value from a specific folder of the list
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 spo list defaultvalue get --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Company --folderUrl "/sites/Marketing/Logos/Contoso"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Response
|
|
73
|
+
|
|
74
|
+
<Tabs>
|
|
75
|
+
<TabItem value="JSON">
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"fieldName": "Company",
|
|
80
|
+
"fieldValue": "Contoso",
|
|
81
|
+
"folderUrl": "sites/Marketing/Logos"
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
</TabItem>
|
|
86
|
+
<TabItem value="Text">
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
fieldName : Company
|
|
90
|
+
fieldValue: Contoso
|
|
91
|
+
folderUrl : sites/Marketing/Logos
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
</TabItem>
|
|
95
|
+
<TabItem value="CSV">
|
|
96
|
+
|
|
97
|
+
```csv
|
|
98
|
+
fieldName,fieldValue,folderUrl
|
|
99
|
+
Company,Contoso,sites/Marketing/Logos
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
</TabItem>
|
|
103
|
+
<TabItem value="Markdown">
|
|
104
|
+
|
|
105
|
+
```md
|
|
106
|
+
# spo list defaultvalue get --webUrl "https://contoso.sharepoint.com/sites/Marketing" --listTitle "Logos" --fieldName "Company"
|
|
107
|
+
|
|
108
|
+
Date: 2/20/2023
|
|
109
|
+
|
|
110
|
+
Property | Value
|
|
111
|
+
---------|-------
|
|
112
|
+
fieldName | Company
|
|
113
|
+
fieldValue | Contoso
|
|
114
|
+
folderUrl | sites/Marketing/Logos
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
</TabItem>
|
|
118
|
+
</Tabs>
|