@pnp/cli-microsoft365 10.0.0-beta.a868b81 → 10.0.0-beta.d03ed9d
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/Auth.js +6 -4
- package/dist/AuthServer.js +7 -7
- package/dist/Command.js +4 -1
- package/dist/api.js +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands.js +1 -2
- package/dist/m365/commands/login.js +122 -69
- package/dist/m365/commands/setup.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +0 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-add.js +0 -5
- package/dist/m365/entra/commands/app/app-get.js +0 -5
- package/dist/m365/entra/commands/app/app-list.js +0 -5
- package/dist/m365/entra/commands/app/app-permission-add.js +0 -5
- package/dist/m365/entra/commands/app/app-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-role-add.js +0 -5
- package/dist/m365/entra/commands/app/app-role-list.js +0 -5
- package/dist/m365/entra/commands/app/app-role-remove.js +0 -5
- package/dist/m365/entra/commands/app/app-set.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +0 -5
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +0 -5
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +0 -5
- package/dist/m365/entra/commands/group/group-add.js +0 -4
- package/dist/m365/entra/commands/group/group-get.js +0 -5
- package/dist/m365/entra/commands/group/group-list.js +0 -5
- package/dist/m365/entra/commands/group/{group-user-add.js → group-member-add.js} +18 -18
- package/dist/m365/entra/commands/group/{group-user-list.js → group-member-list.js} +16 -21
- package/dist/m365/entra/commands/group/{group-user-set.js → group-member-set.js} +19 -19
- package/dist/m365/entra/commands/group/group-remove.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +0 -5
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +0 -5
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +0 -5
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +0 -5
- package/dist/m365/entra/commands/license/license-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-add.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-get.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-remove.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-renew.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-report-activitycounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitydetail.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activityfilecounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitygroupcounts.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-report-activitystorage.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-set.js +159 -86
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +5 -18
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +0 -5
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +0 -6
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +3 -15
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +0 -5
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +3 -17
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +0 -5
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +0 -5
- package/dist/m365/entra/commands/policy/policy-list.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-disable.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-enable.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-get.js +0 -5
- package/dist/m365/entra/commands/siteclassification/siteclassification-set.js +0 -5
- package/dist/m365/entra/commands/user/user-add.js +0 -5
- package/dist/m365/entra/commands/user/user-get.js +0 -5
- package/dist/m365/entra/commands/user/user-guest-add.js +0 -5
- package/dist/m365/entra/commands/user/user-hibp.js +0 -5
- package/dist/m365/entra/commands/user/user-license-add.js +0 -5
- package/dist/m365/entra/commands/user/user-license-list.js +0 -5
- package/dist/m365/entra/commands/user/user-license-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-list.js +0 -5
- package/dist/m365/entra/commands/user/user-password-validate.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-list.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +0 -5
- package/dist/m365/entra/commands/user/user-registrationdetails-list.js +0 -4
- package/dist/m365/entra/commands/user/user-remove.js +0 -5
- package/dist/m365/entra/commands/user/user-set.js +0 -5
- package/dist/m365/entra/commands/user/user-signin-list.js +0 -5
- package/dist/m365/entra/commands.js +3 -3
- package/dist/m365/external/commands/item/item-add.js +2 -5
- package/dist/m365/file/commands/file-move.js +135 -0
- package/dist/m365/file/commands.js +2 -1
- package/dist/m365/flow/commands/environment/environment-list.js +1 -1
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-list.js +47 -0
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-restore.js +48 -0
- package/dist/m365/flow/commands.js +2 -0
- package/dist/m365/pa/commands/app/app-list.js +1 -6
- package/dist/m365/pa/commands/connector/connector-list.js +1 -6
- package/dist/m365/pa/commands/environment/environment-list.js +1 -1
- package/dist/m365/pp/commands/environment/environment-list.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.20.0.js +27 -0
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002021_DEVDEP_rushstack_eslint_config.js +10 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.20.0.js +59 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- package/dist/m365/spo/commands/app/app-instance-list.js +3 -18
- package/dist/m365/spo/commands/app/app-list.js +1 -8
- package/dist/m365/spo/commands/feature/feature-list.js +1 -8
- package/dist/m365/spo/commands/file/file-copy.js +11 -7
- package/dist/m365/spo/commands/file/file-move.js +55 -33
- package/dist/m365/spo/commands/folder/folder-move.js +43 -35
- package/dist/m365/spo/commands/folder/folder-sharinglink-add.js +143 -0
- package/dist/m365/spo/commands/folder/folder-sharinglink-clear.js +111 -0
- package/dist/m365/spo/commands/folder/folder-sharinglink-remove.js +95 -0
- package/dist/m365/spo/commands/group/group-member-add.js +3 -23
- package/dist/m365/spo/commands/group/group-member-remove.js +1 -18
- package/dist/m365/spo/commands/list/list-webhook-list.js +1 -6
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +1 -8
- package/dist/m365/spo/commands/page/page-list.js +1 -1
- package/dist/m365/spo/commands/page/page-remove.js +37 -16
- package/dist/m365/spo/commands/page/page-template-list.js +1 -3
- package/dist/m365/spo/commands/site/SiteAdmin.js +2 -0
- package/dist/m365/spo/commands/site/site-admin-add.js +252 -0
- package/dist/m365/spo/commands/site/site-admin-list.js +10 -36
- package/dist/m365/spo/commands/site/site-admin-remove.js +194 -0
- package/dist/m365/spo/commands/site/site-sharingpermission-set.js +68 -0
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +1 -3
- package/dist/m365/spo/commands/{site/site-rename.js → tenant/tenant-site-rename.js} +29 -32
- package/dist/m365/spo/commands/theme/theme-list.js +1 -1
- package/dist/m365/spo/commands/user/user-ensure.js +1 -11
- package/dist/m365/spo/commands/user/user-get.js +67 -9
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
- package/dist/m365/spo/commands.js +7 -1
- package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +56 -0
- package/dist/m365/spp/commands.js +5 -0
- package/dist/m365/teams/MeetingTranscript.js +2 -0
- package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +152 -0
- package/dist/m365/teams/commands/tab/tab-list.js +5 -3
- package/dist/m365/teams/commands.js +1 -0
- package/dist/m365/viva/commands/engage/Community.js +2 -0
- package/dist/m365/viva/commands/engage/engage-community-list.js +28 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/request.js +46 -61
- package/dist/utils/driveUtil.js +51 -0
- package/dist/utils/spo.js +108 -22
- package/dist/utils/timersUtil.js +13 -0
- package/dist/utils/urlUtil.js +8 -0
- package/dist/utils/zod.js +12 -3
- package/docs/docs/cmd/cli/cli-doctor.mdx +24 -23
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-add.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-get.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-list.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-add.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-get.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-list.mdx +0 -6
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-remove.mdx +0 -6
- package/docs/docs/cmd/entra/app/app-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-get.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-list.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-permission-list.mdx +0 -6
- package/docs/docs/cmd/entra/app/app-remove.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-add.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-list.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +0 -1
- package/docs/docs/cmd/entra/app/app-set.mdx +0 -1
- package/docs/docs/cmd/entra/approleassignment/approleassignment-add.mdx +0 -6
- package/docs/docs/cmd/entra/approleassignment/approleassignment-list.mdx +0 -6
- package/docs/docs/cmd/entra/approleassignment/approleassignment-remove.mdx +0 -6
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +0 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +0 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +0 -1
- package/docs/docs/cmd/entra/group/group-add.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-get.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-list.mdx +0 -6
- package/docs/docs/cmd/entra/group/group-member-add.mdx +62 -0
- package/docs/docs/cmd/entra/group/{group-user-list.mdx → group-member-list.mdx} +14 -20
- package/docs/docs/cmd/entra/group/group-member-set.mdx +62 -0
- package/docs/docs/cmd/entra/group/group-remove.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-add.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-get.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-list.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-remove.mdx +0 -6
- package/docs/docs/cmd/entra/groupsetting/groupsetting-set.mdx +0 -6
- package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-get.mdx +0 -6
- package/docs/docs/cmd/entra/groupsettingtemplate/groupsettingtemplate-list.mdx +0 -6
- package/docs/docs/cmd/entra/license/license-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-add.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-conversation-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-clear.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-remove.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-restore.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-renew.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitycounts.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitydetail.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activityfilecounts.mdx +0 -6
- package/docs/docs/cmd/entra/m365group/m365group-report-activitygroupcounts.mdx +2 -8
- package/docs/docs/cmd/entra/m365group/m365group-report-activitystorage.mdx +3 -9
- package/docs/docs/cmd/entra/m365group/m365group-set.mdx +38 -23
- package/docs/docs/cmd/entra/m365group/m365group-teamify.mdx +5 -11
- package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +5 -14
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +0 -12
- package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +7 -17
- package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +4 -17
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +3 -9
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -7
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-remove.mdx +4 -10
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-set.mdx +3 -9
- package/docs/docs/cmd/entra/policy/policy-list.mdx +3 -9
- package/docs/docs/cmd/entra/siteclassification/siteclassification-disable.mdx +3 -9
- package/docs/docs/cmd/entra/siteclassification/siteclassification-enable.mdx +7 -13
- package/docs/docs/cmd/entra/siteclassification/siteclassification-get.mdx +1 -7
- package/docs/docs/cmd/entra/siteclassification/siteclassification-set.mdx +8 -14
- package/docs/docs/cmd/entra/user/user-add.mdx +4 -10
- package/docs/docs/cmd/entra/user/user-get.mdx +7 -13
- package/docs/docs/cmd/entra/user/user-guest-add.mdx +3 -9
- package/docs/docs/cmd/entra/user/user-hibp.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-license-add.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-license-list.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-license-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-list.mdx +1 -7
- package/docs/docs/cmd/entra/user/user-password-validate.mdx +1 -7
- package/docs/docs/cmd/entra/user/user-recyclebinitem-clear.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-recyclebinitem-list.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-recyclebinitem-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-recyclebinitem-restore.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-registrationdetails-list.mdx +7 -13
- package/docs/docs/cmd/entra/user/user-remove.mdx +2 -8
- package/docs/docs/cmd/entra/user/user-set.mdx +0 -6
- package/docs/docs/cmd/entra/user/user-signin-list.mdx +9 -15
- package/docs/docs/cmd/external/item/item-add.mdx +3 -3
- package/docs/docs/cmd/file/file-move.mdx +79 -0
- package/docs/docs/cmd/flow/recyclebinitem/recyclebinitem-list.mdx +132 -0
- package/docs/docs/cmd/flow/recyclebinitem/recyclebinitem-restore.mdx +55 -0
- package/docs/docs/cmd/login.mdx +9 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-get.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-add.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-list.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-origin-remove.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.mdx +1 -1
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.mdx +1 -1
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-move.mdx +116 -11
- package/docs/docs/cmd/spo/folder/folder-move.mdx +84 -13
- package/docs/docs/cmd/spo/folder/folder-sharinglink-add.mdx +125 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-clear.mdx +50 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-remove.mdx +50 -0
- package/docs/docs/cmd/spo/group/group-member-add.mdx +8 -14
- package/docs/docs/cmd/spo/group/group-member-remove.mdx +5 -11
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.mdx +1 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.mdx +1 -1
- package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-get.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-remove.mdx +1 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-remove.mdx +1 -1
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
- package/docs/docs/cmd/spo/site/site-admin-add.mdx +67 -0
- package/docs/docs/cmd/spo/site/site-admin-list.mdx +64 -12
- package/docs/docs/cmd/spo/site/site-admin-remove.mdx +67 -0
- package/docs/docs/cmd/spo/site/site-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-commsite-enable.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +6 -4
- package/docs/docs/cmd/spo/site/site-set.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-sharingpermission-set.mdx +58 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-appcatalogurl-get.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-settings-list.mdx +1 -1
- package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
- package/docs/docs/cmd/spo/theme/theme-apply.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-get.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-list.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-remove.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-set.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-ensure.mdx +2 -5
- package/docs/docs/cmd/spo/user/user-get.mdx +35 -9
- package/docs/docs/cmd/spp/contentcenter/contentcenter-list.mdx +287 -0
- package/docs/docs/cmd/teams/meeting/meeting-transcript-get.mdx +132 -0
- package/docs/docs/cmd/teams/tab/tab-list.mdx +1 -2
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +81 -0
- package/npm-shrinkwrap.json +203 -375
- package/package.json +16 -17
- package/dist/m365/cli/commands/cli-reconsent.js +0 -29
- package/dist/m365/entra/aadCommands.js +0 -89
- package/docs/docs/cmd/cli/cli-reconsent.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-add.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-set.mdx +0 -62
|
@@ -3,8 +3,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoUserGetCommand_instances, _SpoUserGetCommand_initTelemetry, _SpoUserGetCommand_initOptions, _SpoUserGetCommand_initValidators, _SpoUserGetCommand_initOptionSets;
|
|
6
|
+
var _SpoUserGetCommand_instances, _SpoUserGetCommand_initTelemetry, _SpoUserGetCommand_initOptions, _SpoUserGetCommand_initTypes, _SpoUserGetCommand_initValidators, _SpoUserGetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
8
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
10
|
import { validation } from '../../../../utils/validation.js';
|
|
10
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -23,23 +24,38 @@ class SpoUserGetCommand extends SpoCommand {
|
|
|
23
24
|
__classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initOptions).call(this);
|
|
24
25
|
__classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initValidators).call(this);
|
|
25
26
|
__classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initOptionSets).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoUserGetCommand_instances, "m", _SpoUserGetCommand_initTypes).call(this);
|
|
26
28
|
}
|
|
27
29
|
async commandAction(logger, args) {
|
|
28
30
|
if (this.verbose) {
|
|
29
31
|
await logger.logToStderr(`Retrieving information for user in site '${args.options.webUrl}'...`);
|
|
30
32
|
}
|
|
31
|
-
let requestUrl =
|
|
33
|
+
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
32
34
|
if (args.options.id) {
|
|
33
|
-
requestUrl
|
|
35
|
+
requestUrl += `siteusers/GetById('${formatting.encodeQueryParameter(args.options.id.toString())}')`;
|
|
34
36
|
}
|
|
35
37
|
else if (args.options.email) {
|
|
36
|
-
requestUrl
|
|
38
|
+
requestUrl += `siteusers/GetByEmail('${formatting.encodeQueryParameter(args.options.email)}')`;
|
|
37
39
|
}
|
|
38
40
|
else if (args.options.loginName) {
|
|
39
|
-
requestUrl
|
|
41
|
+
requestUrl += `siteusers/GetByLoginName('${formatting.encodeQueryParameter(args.options.loginName)}')`;
|
|
42
|
+
}
|
|
43
|
+
else if (args.options.userName) {
|
|
44
|
+
const user = await this.getUser(requestUrl, args.options.userName);
|
|
45
|
+
requestUrl += `siteusers/GetById('${formatting.encodeQueryParameter(user.Id.toString())}')`;
|
|
46
|
+
}
|
|
47
|
+
else if (args.options.entraGroupId || args.options.entraGroupName) {
|
|
48
|
+
const entraGroup = await this.getEntraGroup(args.options.entraGroupId, args.options.entraGroupName);
|
|
49
|
+
// For entra groups, M365 groups have an associated email and security groups don't
|
|
50
|
+
if (entraGroup?.mail) {
|
|
51
|
+
requestUrl += `siteusers/GetByEmail('${formatting.encodeQueryParameter(entraGroup.mail)}')`;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
requestUrl += `siteusers/GetByLoginName('c:0t.c|tenant|${entraGroup?.id}')`;
|
|
55
|
+
}
|
|
40
56
|
}
|
|
41
57
|
else {
|
|
42
|
-
requestUrl
|
|
58
|
+
requestUrl += `currentuser`;
|
|
43
59
|
}
|
|
44
60
|
const requestOptions = {
|
|
45
61
|
url: requestUrl,
|
|
@@ -57,13 +73,38 @@ class SpoUserGetCommand extends SpoCommand {
|
|
|
57
73
|
this.handleRejectedODataJsonPromise(err);
|
|
58
74
|
}
|
|
59
75
|
}
|
|
76
|
+
async getUser(baseUrl, userName) {
|
|
77
|
+
const requestUrl = `${baseUrl}siteusers?$filter=UserPrincipalName eq ('${formatting.encodeQueryParameter(userName)}')`;
|
|
78
|
+
const requestOptions = {
|
|
79
|
+
url: requestUrl,
|
|
80
|
+
headers: {
|
|
81
|
+
accept: 'application/json;odata=nometadata'
|
|
82
|
+
},
|
|
83
|
+
responseType: 'json'
|
|
84
|
+
};
|
|
85
|
+
const userInstance = await request.get(requestOptions);
|
|
86
|
+
const userInstanceValue = userInstance.value[0];
|
|
87
|
+
if (!userInstanceValue) {
|
|
88
|
+
throw `User not found: ${userName}`;
|
|
89
|
+
}
|
|
90
|
+
return userInstanceValue;
|
|
91
|
+
}
|
|
92
|
+
async getEntraGroup(entraGroupId, entraGroupName) {
|
|
93
|
+
if (entraGroupId) {
|
|
94
|
+
return entraGroup.getGroupById(entraGroupId);
|
|
95
|
+
}
|
|
96
|
+
return entraGroup.getGroupByDisplayName(entraGroupName);
|
|
97
|
+
}
|
|
60
98
|
}
|
|
61
99
|
_SpoUserGetCommand_instances = new WeakSet(), _SpoUserGetCommand_initTelemetry = function _SpoUserGetCommand_initTelemetry() {
|
|
62
100
|
this.telemetry.push((args) => {
|
|
63
101
|
Object.assign(this.telemetryProperties, {
|
|
64
102
|
id: typeof args.options.id !== 'undefined',
|
|
65
103
|
email: typeof args.options.email !== 'undefined',
|
|
66
|
-
loginName: typeof args.options.loginName !== 'undefined'
|
|
104
|
+
loginName: typeof args.options.loginName !== 'undefined',
|
|
105
|
+
userName: typeof args.options.userName !== 'undefined',
|
|
106
|
+
entraGroupId: typeof args.options.entraGroupId !== 'undefined',
|
|
107
|
+
entraGroupName: typeof args.options.entraGroupName !== 'undefined'
|
|
67
108
|
});
|
|
68
109
|
});
|
|
69
110
|
}, _SpoUserGetCommand_initOptions = function _SpoUserGetCommand_initOptions() {
|
|
@@ -75,19 +116,36 @@ _SpoUserGetCommand_instances = new WeakSet(), _SpoUserGetCommand_initTelemetry =
|
|
|
75
116
|
option: '--email [email]'
|
|
76
117
|
}, {
|
|
77
118
|
option: '--loginName [loginName]'
|
|
119
|
+
}, {
|
|
120
|
+
option: '--userName [userName]'
|
|
121
|
+
}, {
|
|
122
|
+
option: '--entraGroupId [entraGroupId]'
|
|
123
|
+
}, {
|
|
124
|
+
option: '--entraGroupName [entraGroupName]'
|
|
78
125
|
});
|
|
126
|
+
}, _SpoUserGetCommand_initTypes = function _SpoUserGetCommand_initTypes() {
|
|
127
|
+
this.types.string.push('webUrl', 'id', 'email', 'loginName', 'userName', 'entraGroupId', 'entraGroupName');
|
|
79
128
|
}, _SpoUserGetCommand_initValidators = function _SpoUserGetCommand_initValidators() {
|
|
80
129
|
this.validators.push(async (args) => {
|
|
81
130
|
if (args.options.id &&
|
|
82
131
|
typeof args.options.id !== 'number') {
|
|
83
132
|
return `Specified id ${args.options.id} is not a number`;
|
|
84
133
|
}
|
|
134
|
+
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
135
|
+
return `${args.options.entraGroupId} is not a valid GUID.`;
|
|
136
|
+
}
|
|
137
|
+
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
138
|
+
return `${args.options.userName} is not a valid userName.`;
|
|
139
|
+
}
|
|
140
|
+
if (args.options.email && !validation.isValidUserPrincipalName(args.options.email)) {
|
|
141
|
+
return `${args.options.email} is not a valid email.`;
|
|
142
|
+
}
|
|
85
143
|
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
86
144
|
});
|
|
87
145
|
}, _SpoUserGetCommand_initOptionSets = function _SpoUserGetCommand_initOptionSets() {
|
|
88
146
|
this.optionSets.push({
|
|
89
|
-
options: ['id', 'email', 'loginName'],
|
|
90
|
-
runsWhen: (args) => args.options.id || args.options.loginName || args.options.
|
|
147
|
+
options: ['id', 'email', 'loginName', 'userName', 'entraGroupId', 'entraGroupName'],
|
|
148
|
+
runsWhen: (args) => args.options.id || args.options.email || args.options.loginName || args.options.userName || args.options.entraGroupId || args.options.entraGroupName
|
|
91
149
|
});
|
|
92
150
|
};
|
|
93
151
|
export default new SpoUserGetCommand();
|
|
@@ -41,12 +41,7 @@ class SpoWebClientSideWebPartListCommand extends SpoCommand {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
|
|
45
|
-
await logger.logToStderr("No client-side web parts available for this site");
|
|
46
|
-
}
|
|
47
|
-
if (clientSideWebParts.length > 0) {
|
|
48
|
-
await logger.log(clientSideWebParts);
|
|
49
|
-
}
|
|
44
|
+
await logger.log(clientSideWebParts);
|
|
50
45
|
}
|
|
51
46
|
catch (err) {
|
|
52
47
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -99,8 +99,11 @@ export default {
|
|
|
99
99
|
FOLDER_ROLEASSIGNMENT_ADD: `${prefix} folder roleassignment add`,
|
|
100
100
|
FOLDER_ROLEINHERITANCE_BREAK: `${prefix} folder roleinheritance break`,
|
|
101
101
|
FOLDER_ROLEINHERITANCE_RESET: `${prefix} folder roleinheritance reset`,
|
|
102
|
+
FOLDER_SHARINGLINK_ADD: `${prefix} folder sharinglink add`,
|
|
103
|
+
FOLDER_SHARINGLINK_CLEAR: `${prefix} folder sharinglink clear`,
|
|
102
104
|
FOLDER_SHARINGLINK_GET: `${prefix} folder sharinglink get`,
|
|
103
105
|
FOLDER_SHARINGLINK_LIST: `${prefix} folder sharinglink list`,
|
|
106
|
+
FOLDER_SHARINGLINK_REMOVE: `${prefix} folder sharinglink remove`,
|
|
104
107
|
GET: `${prefix} get`,
|
|
105
108
|
GROUP_ADD: `${prefix} group add`,
|
|
106
109
|
GROUP_GET: `${prefix} group get`,
|
|
@@ -241,7 +244,9 @@ export default {
|
|
|
241
244
|
SERVICEPRINCIPAL_SET: `${prefix} serviceprincipal set`,
|
|
242
245
|
SET: `${prefix} set`,
|
|
243
246
|
SITE_ADD: `${prefix} site add`,
|
|
247
|
+
SITE_ADMIN_ADD: `${prefix} site admin add`,
|
|
244
248
|
SITE_ADMIN_LIST: `${prefix} site admin list`,
|
|
249
|
+
SITE_ADMIN_REMOVE: `${prefix} site admin remove`,
|
|
245
250
|
SITE_APPCATALOG_ADD: `${prefix} site appcatalog add`,
|
|
246
251
|
SITE_APPCATALOG_LIST: `${prefix} site appcatalog list`,
|
|
247
252
|
SITE_APPCATALOG_REMOVE: `${prefix} site appcatalog remove`,
|
|
@@ -265,8 +270,8 @@ export default {
|
|
|
265
270
|
SITE_RECYCLEBINITEM_REMOVE: `${prefix} site recyclebinitem remove`,
|
|
266
271
|
SITE_RECYCLEBINITEM_RESTORE: `${prefix} site recyclebinitem restore`,
|
|
267
272
|
SITE_REMOVE: `${prefix} site remove`,
|
|
268
|
-
SITE_RENAME: `${prefix} site rename`,
|
|
269
273
|
SITE_SET: `${prefix} site set`,
|
|
274
|
+
SITE_SHARINGPERMISSION_SET: `${prefix} site sharingpermission set`,
|
|
270
275
|
SITE_CHROME_SET: `${prefix} site chrome set`,
|
|
271
276
|
SITEDESIGN_ADD: `${prefix} sitedesign add`,
|
|
272
277
|
SITEDESIGN_APPLY: `${prefix} sitedesign apply`,
|
|
@@ -316,6 +321,7 @@ export default {
|
|
|
316
321
|
TENANT_SETTINGS_LIST: `${prefix} tenant settings list`,
|
|
317
322
|
TENANT_SETTINGS_SET: `${prefix} tenant settings set`,
|
|
318
323
|
TENANT_SITE_ARCHIVE: `${prefix} tenant site archive`,
|
|
324
|
+
TENANT_SITE_RENAME: `${prefix} tenant site rename`,
|
|
319
325
|
TENANT_SITE_UNARCHIVE: `${prefix} tenant site unarchive`,
|
|
320
326
|
TERM_ADD: `${prefix} term add`,
|
|
321
327
|
TERM_GET: `${prefix} term get`,
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import config from '../../../../config.js';
|
|
2
|
+
import request from '../../../../request.js';
|
|
3
|
+
import { spo } from '../../../../utils/spo.js';
|
|
4
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
5
|
+
import commands from '../../commands.js';
|
|
6
|
+
class SppContentCenterListCommand extends SpoCommand {
|
|
7
|
+
get name() {
|
|
8
|
+
return commands.CONTENTCENTER_LIST;
|
|
9
|
+
}
|
|
10
|
+
get description() {
|
|
11
|
+
return 'Gets information about the SharePoint Premium content centers';
|
|
12
|
+
}
|
|
13
|
+
defaultProperties() {
|
|
14
|
+
return ['Title', 'Url'];
|
|
15
|
+
}
|
|
16
|
+
async commandAction(logger) {
|
|
17
|
+
try {
|
|
18
|
+
if (this.verbose) {
|
|
19
|
+
await logger.logToStderr(`Retrieving list of content centers...`);
|
|
20
|
+
}
|
|
21
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
22
|
+
const allContentCenters = await this.getContentCenters(spoAdminUrl, logger);
|
|
23
|
+
await logger.log(allContentCenters);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
this.handleRejectedODataJsonPromise(err);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async getContentCenters(spoAdminUrl, logger) {
|
|
30
|
+
const allSites = [];
|
|
31
|
+
let currentStartIndex = '0';
|
|
32
|
+
const res = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, this.debug);
|
|
33
|
+
do {
|
|
34
|
+
const requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="2" ObjectPathId="1" /><ObjectPath Id="4" ObjectPathId="3" /><Query Id="5" ObjectPathId="3"><Query SelectAllProperties="true"><Properties /></Query><ChildItemQuery SelectAllProperties="true"><Properties /></ChildItemQuery></Query></Actions><ObjectPaths><Constructor Id="1" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="3" ParentId="1" Name="GetSitePropertiesFromSharePointByFilters"><Parameters><Parameter TypeId="{b92aeee2-c92c-4b67-abcc-024e471bc140}"><Property Name="Filter" Type="String"></Property><Property Name="IncludeDetail" Type="Boolean">false</Property><Property Name="IncludePersonalSite" Type="Enum">0</Property><Property Name="StartIndex" Type="String">${currentStartIndex}</Property><Property Name="Template" Type="String">CONTENTCTR#0</Property></Parameter></Parameters></Method></ObjectPaths></Request>`;
|
|
35
|
+
const requestOptions = {
|
|
36
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
37
|
+
headers: {
|
|
38
|
+
'X-RequestDigest': res.FormDigestValue
|
|
39
|
+
},
|
|
40
|
+
data: requestBody
|
|
41
|
+
};
|
|
42
|
+
const response = await request.post(requestOptions);
|
|
43
|
+
const json = JSON.parse(response);
|
|
44
|
+
const responseContent = json[0];
|
|
45
|
+
if (responseContent.ErrorInfo) {
|
|
46
|
+
throw responseContent.ErrorInfo.ErrorMessage;
|
|
47
|
+
}
|
|
48
|
+
const sites = json[json.length - 1];
|
|
49
|
+
allSites.push(...sites._Child_Items_);
|
|
50
|
+
currentStartIndex = sites.NextStartIndexFromSharePoint;
|
|
51
|
+
} while (currentStartIndex);
|
|
52
|
+
return allSites;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export default new SppContentCenterListCommand();
|
|
56
|
+
//# sourceMappingURL=contentcenter-list.js.map
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _TeamsMeetingTranscriptGetCommand_instances, _TeamsMeetingTranscriptGetCommand_initTelemetry, _TeamsMeetingTranscriptGetCommand_initOptions, _TeamsMeetingTranscriptGetCommand_initValidators, _TeamsMeetingTranscriptGetCommand_initOptionSets;
|
|
7
|
+
import auth from '../../../../Auth.js';
|
|
8
|
+
import request from '../../../../request.js';
|
|
9
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
10
|
+
import { accessToken } from '../../../../utils/accessToken.js';
|
|
11
|
+
import { validation } from '../../../../utils/validation.js';
|
|
12
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
|
+
import commands from '../../commands.js';
|
|
14
|
+
import fs from 'fs';
|
|
15
|
+
import path from 'path';
|
|
16
|
+
class TeamsMeetingTranscriptGetCommand extends GraphCommand {
|
|
17
|
+
get name() {
|
|
18
|
+
return commands.MEETING_TRANSCRIPT_GET;
|
|
19
|
+
}
|
|
20
|
+
get description() {
|
|
21
|
+
return 'Downloads a transcript for a given meeting';
|
|
22
|
+
}
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
_TeamsMeetingTranscriptGetCommand_instances.add(this);
|
|
26
|
+
__classPrivateFieldGet(this, _TeamsMeetingTranscriptGetCommand_instances, "m", _TeamsMeetingTranscriptGetCommand_initTelemetry).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _TeamsMeetingTranscriptGetCommand_instances, "m", _TeamsMeetingTranscriptGetCommand_initOptions).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _TeamsMeetingTranscriptGetCommand_instances, "m", _TeamsMeetingTranscriptGetCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _TeamsMeetingTranscriptGetCommand_instances, "m", _TeamsMeetingTranscriptGetCommand_initOptionSets).call(this);
|
|
30
|
+
}
|
|
31
|
+
async commandAction(logger, args) {
|
|
32
|
+
try {
|
|
33
|
+
const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(auth.connection.accessTokens[this.resource].accessToken);
|
|
34
|
+
if (this.verbose) {
|
|
35
|
+
await logger.logToStderr(`Retrieving transcript for the given meeting...`);
|
|
36
|
+
}
|
|
37
|
+
let requestUrl = `${this.resource}/beta/`;
|
|
38
|
+
if (isAppOnlyAccessToken) {
|
|
39
|
+
if (!args.options.userId && !args.options.userName && !args.options.email) {
|
|
40
|
+
throw `The option 'userId', 'userName' or 'email' is required when retrieving meeting transcript using app only permissions`;
|
|
41
|
+
}
|
|
42
|
+
requestUrl += 'users/';
|
|
43
|
+
if (args.options.userId) {
|
|
44
|
+
requestUrl += args.options.userId;
|
|
45
|
+
}
|
|
46
|
+
else if (args.options.userName) {
|
|
47
|
+
requestUrl += args.options.userName;
|
|
48
|
+
}
|
|
49
|
+
else if (args.options.email) {
|
|
50
|
+
if (this.verbose) {
|
|
51
|
+
await logger.logToStderr(`Getting user ID for user with email '${args.options.email}'.`);
|
|
52
|
+
}
|
|
53
|
+
const userId = await entraUser.getUserIdByEmail(args.options.email);
|
|
54
|
+
requestUrl += userId;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
if (args.options.userId || args.options.userName || args.options.email) {
|
|
59
|
+
throw `The options 'userId', 'userName', and 'email' cannot be used while retrieving meeting transcript using delegated permissions`;
|
|
60
|
+
}
|
|
61
|
+
requestUrl += `me`;
|
|
62
|
+
}
|
|
63
|
+
requestUrl += `/onlineMeetings/${args.options.meetingId}/transcripts/${args.options.id}`;
|
|
64
|
+
if (args.options.outputFile) {
|
|
65
|
+
requestUrl += '/content?$format=text/vtt';
|
|
66
|
+
}
|
|
67
|
+
const requestOptions = {
|
|
68
|
+
url: requestUrl,
|
|
69
|
+
headers: {
|
|
70
|
+
accept: 'application/json;odata.metadata=none'
|
|
71
|
+
},
|
|
72
|
+
responseType: args.options.outputFile ? 'stream' : 'json'
|
|
73
|
+
};
|
|
74
|
+
const meetingTranscript = await request.get(requestOptions);
|
|
75
|
+
if (meetingTranscript) {
|
|
76
|
+
if (args.options.outputFile) {
|
|
77
|
+
// Not possible to use async/await for this promise
|
|
78
|
+
await new Promise((resolve, reject) => {
|
|
79
|
+
const writer = fs.createWriteStream(args.options.outputFile);
|
|
80
|
+
meetingTranscript.data.pipe(writer);
|
|
81
|
+
writer.on('error', err => {
|
|
82
|
+
reject(err);
|
|
83
|
+
});
|
|
84
|
+
writer.on('close', async () => {
|
|
85
|
+
const filePath = args.options.outputFile;
|
|
86
|
+
if (this.verbose) {
|
|
87
|
+
await logger.logToStderr(`File saved to path ${filePath}`);
|
|
88
|
+
}
|
|
89
|
+
return resolve();
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
await logger.log(meetingTranscript);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
throw `The specified meeting transcript was not found`;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
this.handleRejectedODataJsonPromise(err);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
_TeamsMeetingTranscriptGetCommand_instances = new WeakSet(), _TeamsMeetingTranscriptGetCommand_initTelemetry = function _TeamsMeetingTranscriptGetCommand_initTelemetry() {
|
|
107
|
+
this.telemetry.push((args) => {
|
|
108
|
+
Object.assign(this.telemetryProperties, {
|
|
109
|
+
userId: typeof args.options.userId !== 'undefined',
|
|
110
|
+
userName: typeof args.options.userName !== 'undefined',
|
|
111
|
+
email: typeof args.options.email !== 'undefined',
|
|
112
|
+
outputFile: typeof args.options.outputFile !== 'undefined'
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
}, _TeamsMeetingTranscriptGetCommand_initOptions = function _TeamsMeetingTranscriptGetCommand_initOptions() {
|
|
116
|
+
this.options.unshift({
|
|
117
|
+
option: '-u, --userId [userId]'
|
|
118
|
+
}, {
|
|
119
|
+
option: '-n, --userName [userName]'
|
|
120
|
+
}, {
|
|
121
|
+
option: '--email [email]'
|
|
122
|
+
}, {
|
|
123
|
+
option: '-m, --meetingId <meetingId>'
|
|
124
|
+
}, {
|
|
125
|
+
option: '-i, --id <id>'
|
|
126
|
+
}, {
|
|
127
|
+
option: '-f, --outputFile [outputFile]'
|
|
128
|
+
});
|
|
129
|
+
}, _TeamsMeetingTranscriptGetCommand_initValidators = function _TeamsMeetingTranscriptGetCommand_initValidators() {
|
|
130
|
+
this.validators.push(async (args) => {
|
|
131
|
+
if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
|
|
132
|
+
return `${args.options.userId} is not a valid Guid`;
|
|
133
|
+
}
|
|
134
|
+
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
135
|
+
return `${args.options.userName} is not a valid user principal name (UPN)`;
|
|
136
|
+
}
|
|
137
|
+
if (args.options.email && !validation.isValidUserPrincipalName(args.options.email)) {
|
|
138
|
+
return `${args.options.email} is not a valid email`;
|
|
139
|
+
}
|
|
140
|
+
if (args.options.outputFile && !fs.existsSync(path.dirname(args.options.outputFile))) {
|
|
141
|
+
return 'Specified path where to save the file does not exits';
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
});
|
|
145
|
+
}, _TeamsMeetingTranscriptGetCommand_initOptionSets = function _TeamsMeetingTranscriptGetCommand_initOptionSets() {
|
|
146
|
+
this.optionSets.push({
|
|
147
|
+
options: ['userId', 'userName', 'email'],
|
|
148
|
+
runsWhen: (args) => args.options.userId || args.options.userName || args.options.email
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
export default new TeamsMeetingTranscriptGetCommand();
|
|
152
|
+
//# sourceMappingURL=meeting-transcript-get.js.map
|
|
@@ -29,9 +29,11 @@ class TeamsTabListCommand extends GraphCommand {
|
|
|
29
29
|
const endpoint = `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${formatting.encodeQueryParameter(args.options.channelId)}/tabs?$expand=teamsApp`;
|
|
30
30
|
try {
|
|
31
31
|
const items = await odata.getAllItems(endpoint);
|
|
32
|
-
|
|
33
|
-
i
|
|
34
|
-
|
|
32
|
+
if (args.options.output !== 'json') {
|
|
33
|
+
items.forEach(i => {
|
|
34
|
+
i.teamsAppTabId = i.teamsApp.id;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
35
37
|
await logger.log(items);
|
|
36
38
|
}
|
|
37
39
|
catch (err) {
|
|
@@ -32,6 +32,7 @@ export default {
|
|
|
32
32
|
MEETING_LIST: `${prefix} meeting list`,
|
|
33
33
|
MEETING_ATTENDANCEREPORT_GET: `${prefix} meeting attendancereport get`,
|
|
34
34
|
MEETING_ATTENDANCEREPORT_LIST: `${prefix} meeting attendancereport list`,
|
|
35
|
+
MEETING_TRANSCRIPT_GET: `${prefix} meeting transcript get`,
|
|
35
36
|
MEETING_TRANSCRIPT_LIST: `${prefix} meeting transcript list`,
|
|
36
37
|
MEMBERSETTINGS_LIST: `${prefix} membersettings list`,
|
|
37
38
|
MEMBERSETTINGS_SET: `${prefix} membersettings set`,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { odata } from '../../../../utils/odata.js';
|
|
2
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
|
+
import commands from '../../commands.js';
|
|
4
|
+
class VivaEngageCommunityListCommand extends GraphCommand {
|
|
5
|
+
get name() {
|
|
6
|
+
return commands.ENGAGE_COMMUNITY_LIST;
|
|
7
|
+
}
|
|
8
|
+
get description() {
|
|
9
|
+
return 'Lists all Viva Engage communities';
|
|
10
|
+
}
|
|
11
|
+
defaultProperties() {
|
|
12
|
+
return ['id', 'displayName', 'privacy'];
|
|
13
|
+
}
|
|
14
|
+
async commandAction(logger) {
|
|
15
|
+
if (this.verbose) {
|
|
16
|
+
await logger.logToStderr('Getting all Viva Engage communities...');
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const results = await odata.getAllItems(`${this.resource}/v1.0/employeeExperience/communities`);
|
|
20
|
+
await logger.log(results);
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
this.handleRejectedODataJsonPromise(err);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export default new VivaEngageCommunityListCommand();
|
|
28
|
+
//# sourceMappingURL=engage-community-list.js.map
|
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
CONNECTIONS_APP_CREATE: `${prefix} connections app create`,
|
|
4
4
|
ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
|
|
5
5
|
ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
|
|
6
|
+
ENGAGE_COMMUNITY_LIST: `${prefix} engage community list`,
|
|
6
7
|
ENGAGE_GROUP_LIST: `${prefix} engage group list`,
|
|
7
8
|
ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
|
|
8
9
|
ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
|
package/dist/request.js
CHANGED
|
@@ -4,6 +4,7 @@ import auth, { Auth } from './Auth.js';
|
|
|
4
4
|
import { app } from './utils/app.js';
|
|
5
5
|
import { formatting } from './utils/formatting.js';
|
|
6
6
|
import { timings } from './cli/timings.js';
|
|
7
|
+
import { timersUtil } from './utils/timersUtil.js';
|
|
7
8
|
class Request {
|
|
8
9
|
set debug(debug) {
|
|
9
10
|
// if the value to set is the same as current value return early to avoid
|
|
@@ -125,76 +126,60 @@ class Request {
|
|
|
125
126
|
options.method = 'HEAD';
|
|
126
127
|
return this.execute(options);
|
|
127
128
|
}
|
|
128
|
-
execute(options
|
|
129
|
+
async execute(options) {
|
|
129
130
|
const start = process.hrtime.bigint();
|
|
130
131
|
if (!this._logger) {
|
|
131
|
-
|
|
132
|
+
throw 'Logger not set on the request object';
|
|
132
133
|
}
|
|
133
134
|
this.updateRequestForCloudType(options, auth.connection.cloudType);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.
|
|
146
|
-
|
|
147
|
-
if (options.headers['x-anonymous']) {
|
|
148
|
-
delete options.headers['x-anonymous'];
|
|
149
|
-
}
|
|
150
|
-
if (options.headers['x-resource']) {
|
|
151
|
-
delete options.headers['x-resource'];
|
|
152
|
-
}
|
|
153
|
-
if (accessToken !== '') {
|
|
154
|
-
options.headers.authorization = `Bearer ${accessToken}`;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
158
|
-
if (proxyUrl) {
|
|
159
|
-
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
135
|
+
try {
|
|
136
|
+
let accessToken = '';
|
|
137
|
+
if (options.headers && options.headers['x-anonymous']) {
|
|
138
|
+
accessToken = '';
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
const url = options.headers && options.headers['x-resource'] ? options.headers['x-resource'] : options.url;
|
|
142
|
+
const resource = Auth.getResourceFromUrl(url);
|
|
143
|
+
accessToken = await auth.ensureAccessToken(resource, this._logger, this._debug);
|
|
144
|
+
}
|
|
145
|
+
if (options.headers) {
|
|
146
|
+
if (options.headers['x-anonymous']) {
|
|
147
|
+
delete options.headers['x-anonymous'];
|
|
160
148
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.then((res) => {
|
|
164
|
-
if (resolve) {
|
|
165
|
-
resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
|
|
149
|
+
if (options.headers['x-resource']) {
|
|
150
|
+
delete options.headers['x-resource'];
|
|
166
151
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
timings.api.push(Number(end - start));
|
|
170
|
-
_resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
|
|
152
|
+
if (accessToken !== '') {
|
|
153
|
+
options.headers.authorization = `Bearer ${accessToken}`;
|
|
171
154
|
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
155
|
+
}
|
|
156
|
+
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
157
|
+
if (proxyUrl) {
|
|
158
|
+
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
159
|
+
}
|
|
160
|
+
const res = await this.req(options);
|
|
161
|
+
const end = process.hrtime.bigint();
|
|
162
|
+
timings.api.push(Number(end - start));
|
|
163
|
+
return options.responseType === 'stream' || options.fullResponse ?
|
|
164
|
+
res :
|
|
165
|
+
res.data;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
const end = process.hrtime.bigint();
|
|
169
|
+
timings.api.push(Number(end - start));
|
|
170
|
+
if (error && error.response && (error.response.status === 429 || error.response.status === 503)) {
|
|
171
|
+
let retryAfter = parseInt(error.response.headers['retry-after'] || '10');
|
|
172
|
+
if (isNaN(retryAfter)) {
|
|
173
|
+
retryAfter = 10;
|
|
185
174
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
reject(error);
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
const end = process.hrtime.bigint();
|
|
192
|
-
timings.api.push(Number(end - start));
|
|
193
|
-
_reject(error);
|
|
194
|
-
}
|
|
175
|
+
if (this._debug) {
|
|
176
|
+
await this._logger.log(`Request throttled. Waiting ${retryAfter} sec before retrying...`);
|
|
195
177
|
}
|
|
196
|
-
|
|
197
|
-
|
|
178
|
+
await timersUtil.setTimeout(retryAfter * 1000);
|
|
179
|
+
return this.execute(options);
|
|
180
|
+
}
|
|
181
|
+
throw error;
|
|
182
|
+
}
|
|
198
183
|
}
|
|
199
184
|
updateRequestForCloudType(options, cloudType) {
|
|
200
185
|
const url = new URL(options.url);
|