@pnp/cli-microsoft365 10.0.0-beta.e925c1c → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +1 -0
- 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/appInsights.js +6 -4
- package/dist/config.js +1 -0
- package/dist/m365/base/PowerAutomateCommand.js +1 -1
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- 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/commands/setupPresets.js +2 -4
- 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 +84 -62
- 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-get.js +1 -1
- package/dist/m365/flow/commands/environment/environment-list.js +2 -2
- package/dist/m365/flow/commands/flow-disable.js +1 -1
- package/dist/m365/flow/commands/flow-enable.js +1 -1
- package/dist/m365/flow/commands/flow-export.js +17 -16
- package/dist/m365/flow/commands/flow-get.js +1 -1
- package/dist/m365/flow/commands/flow-list.js +1 -1
- package/dist/m365/flow/commands/flow-remove.js +1 -1
- package/dist/m365/flow/commands/owner/owner-ensure.js +1 -1
- package/dist/m365/flow/commands/owner/owner-list.js +1 -1
- package/dist/m365/flow/commands/owner/owner-remove.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/run/run-cancel.js +1 -1
- package/dist/m365/flow/commands/run/run-get.js +1 -1
- package/dist/m365/flow/commands/run/run-list.js +1 -1
- package/dist/m365/flow/commands/run/run-resubmit.js +2 -2
- 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/contenttype/contenttype-field-remove.js +8 -8
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +2 -2
- 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/file/file-remove.js +7 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +17 -54
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +13 -40
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +5 -13
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +5 -13
- package/dist/m365/spo/commands/folder/folder-copy.js +43 -35
- 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/folder/folder-sharinglink-set.js +90 -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-get.js +17 -4
- package/dist/m365/spo/commands/list/list-remove.js +14 -4
- 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-publish.js +54 -0
- package/dist/m365/spo/commands/page/page-remove.js +37 -16
- package/dist/m365/spo/commands/page/page-section-add.js +185 -34
- 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/tenant/SPOTenantSitePropertiesEnumerable.js +2 -0
- package/dist/m365/spo/commands/tenant/TenantSiteProperties.js +2 -0
- package/dist/m365/spo/commands/{site/site-list.js → tenant/tenant-site-list.js} +15 -12
- package/dist/m365/spo/commands/tenant/tenant-site-membership-list.js +118 -0
- 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/userprofile/userprofile-get.js +1 -1
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
- package/dist/m365/spo/commands.js +11 -1
- package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +56 -0
- package/dist/m365/spp/commands/model/model-list.js +57 -0
- package/dist/m365/spp/commands.js +6 -0
- package/dist/m365/teams/MeetingTranscript.js +2 -0
- package/dist/m365/teams/commands/cache/cache-remove.js +74 -34
- package/dist/m365/teams/commands/channel/channel-get.js +15 -50
- 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/team/team-get.js +16 -21
- 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/engage/engage-community-user-list.js +98 -0
- package/dist/m365/viva/commands.js +2 -0
- package/dist/request.js +46 -61
- package/dist/settingsNames.js +0 -1
- package/dist/telemetryRunner.js +2 -2
- package/dist/utils/spo.js +166 -29
- package/dist/utils/spp.js +22 -0
- package/dist/utils/teams.js +47 -5
- package/dist/utils/timersUtil.js +13 -0
- package/dist/utils/urlUtil.js +8 -0
- package/dist/utils/vivaEngage.js +61 -0
- package/dist/utils/zod.js +12 -3
- package/docs/docs/_clisettings.mdx +0 -1
- 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 +26 -21
- 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/setup.mdx +1 -3
- 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/contenttype/contenttype-field-remove.mdx +7 -7
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx +2 -2
- 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/file/file-remove.mdx +13 -4
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +84 -13
- 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/folder/folder-sharinglink-set.mdx +116 -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/list/list-remove.mdx +10 -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-publish.mdx +41 -0
- package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
- package/docs/docs/cmd/spo/page/page-section-add.mdx +57 -2
- 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-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-list.mdx → tenant/tenant-site-list.mdx} +19 -11
- package/docs/docs/cmd/spo/tenant/tenant-site-membership-list.mdx +122 -0
- 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/spp/model/model-list.mdx +140 -0
- package/docs/docs/cmd/teams/cache/cache-remove.mdx +10 -1
- 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/docs/docs/cmd/viva/engage/engage-community-user-list.mdx +123 -0
- package/npm-shrinkwrap.json +2215 -717
- package/package.json +21 -22
- 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,7 +3,7 @@ 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 _TeamsCacheRemoveCommand_instances, _TeamsCacheRemoveCommand_initTelemetry, _TeamsCacheRemoveCommand_initOptions, _TeamsCacheRemoveCommand_initValidators;
|
|
6
|
+
var _TeamsCacheRemoveCommand_instances, _a, _TeamsCacheRemoveCommand_initTelemetry, _TeamsCacheRemoveCommand_initOptions, _TeamsCacheRemoveCommand_initValidators;
|
|
7
7
|
import child_process from 'child_process';
|
|
8
8
|
import fs from 'fs';
|
|
9
9
|
import { homedir } from 'os';
|
|
@@ -30,7 +30,7 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
|
|
|
30
30
|
async commandAction(logger, args) {
|
|
31
31
|
try {
|
|
32
32
|
if (args.options.force) {
|
|
33
|
-
await this.clearTeamsCache(logger);
|
|
33
|
+
await this.clearTeamsCache(args.options.client?.toLowerCase() || 'new', logger);
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
36
|
await logger.logToStderr('This command will execute the following steps.');
|
|
@@ -38,7 +38,7 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
|
|
|
38
38
|
await logger.logToStderr('- Clear the Microsoft Teams cached files.');
|
|
39
39
|
const result = await cli.promptForConfirmation({ message: `Are you sure you want to clear your Microsoft Teams cache?` });
|
|
40
40
|
if (result) {
|
|
41
|
-
await this.clearTeamsCache(logger);
|
|
41
|
+
await this.clearTeamsCache(args.options.client?.toLowerCase() || 'new', logger);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -46,33 +46,50 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
|
|
|
46
46
|
this.handleError(err);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
async clearTeamsCache(logger) {
|
|
50
|
-
const
|
|
51
|
-
|
|
49
|
+
async clearTeamsCache(client, logger) {
|
|
50
|
+
const filePaths = await this.getTeamsCacheFolderPaths(client, logger);
|
|
51
|
+
let folderExists = true;
|
|
52
|
+
for (const filePath of filePaths) {
|
|
53
|
+
const exists = await this.checkIfCacheFolderExists(filePath, logger);
|
|
54
|
+
if (!exists) {
|
|
55
|
+
folderExists = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
52
58
|
if (folderExists) {
|
|
53
|
-
await this.killRunningProcess(logger);
|
|
54
|
-
await this.removeCacheFiles(
|
|
59
|
+
await this.killRunningProcess(client, logger);
|
|
60
|
+
await this.removeCacheFiles(filePaths, logger);
|
|
55
61
|
await logger.logToStderr('Teams cache cleared!');
|
|
56
62
|
}
|
|
57
63
|
else {
|
|
58
64
|
await logger.logToStderr('Cache folder does not exist. Nothing to remove.');
|
|
59
65
|
}
|
|
60
66
|
}
|
|
61
|
-
async
|
|
67
|
+
async getTeamsCacheFolderPaths(client, logger) {
|
|
62
68
|
const platform = process.platform;
|
|
63
69
|
if (this.verbose) {
|
|
64
70
|
await logger.logToStderr(`Getting path of Teams cache folder for platform ${platform}...`);
|
|
65
71
|
}
|
|
66
|
-
|
|
72
|
+
const filePaths = [];
|
|
67
73
|
switch (platform) {
|
|
68
74
|
case 'win32':
|
|
69
|
-
|
|
75
|
+
if (client === 'classic') {
|
|
76
|
+
filePaths.push(`${process.env.APPDATA}\\Microsoft\\Teams`);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
filePaths.push(`${process.env.LOCALAPPDATA}\\Packages\\MSTeams_8wekyb3d8bbwe\\LocalCache\\Microsoft\\MSTeams`);
|
|
80
|
+
}
|
|
70
81
|
break;
|
|
71
82
|
case 'darwin':
|
|
72
|
-
|
|
83
|
+
if (client === 'classic') {
|
|
84
|
+
filePaths.push(`${homedir}/Library/Application Support/Microsoft/Teams`);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
filePaths.push(`${homedir}/Library/Group Containers/UBF8T346G9.com.microsoft.teams`);
|
|
88
|
+
filePaths.push(`${homedir}/Library/Containers/com.microsoft.teams2`);
|
|
89
|
+
}
|
|
73
90
|
break;
|
|
74
91
|
}
|
|
75
|
-
return
|
|
92
|
+
return filePaths;
|
|
76
93
|
}
|
|
77
94
|
async checkIfCacheFolderExists(filePath, logger) {
|
|
78
95
|
if (this.verbose) {
|
|
@@ -80,7 +97,7 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
|
|
|
80
97
|
}
|
|
81
98
|
return fs.existsSync(filePath);
|
|
82
99
|
}
|
|
83
|
-
async killRunningProcess(logger) {
|
|
100
|
+
async killRunningProcess(client, logger) {
|
|
84
101
|
if (this.verbose) {
|
|
85
102
|
await logger.logToStderr('Stopping Teams client...');
|
|
86
103
|
}
|
|
@@ -88,61 +105,83 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
|
|
|
88
105
|
let cmd = '';
|
|
89
106
|
switch (platform) {
|
|
90
107
|
case 'win32':
|
|
91
|
-
|
|
108
|
+
if (client === 'classic') {
|
|
109
|
+
cmd = 'wmic process where caption="Teams.exe" get ProcessId';
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
cmd = 'wmic process where caption="ms-teams.exe" get ProcessId';
|
|
113
|
+
}
|
|
92
114
|
break;
|
|
93
115
|
case 'darwin':
|
|
94
|
-
|
|
116
|
+
if (client === 'classic') {
|
|
117
|
+
cmd = `ps ax | grep MacOS/Teams -m 1 | grep -v grep | awk '{ print $1 }'`;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
cmd = `ps ax | grep MacOS/MSTeams -m 1 | grep -v grep | awk '{ print $1 }'`;
|
|
121
|
+
}
|
|
95
122
|
break;
|
|
96
123
|
}
|
|
97
124
|
if (this.debug) {
|
|
98
125
|
await logger.logToStderr(cmd);
|
|
99
126
|
}
|
|
100
127
|
const cmdOutput = await this.exec(cmd);
|
|
101
|
-
if (platform === 'darwin') {
|
|
128
|
+
if (platform === 'darwin' && cmdOutput.stdout) {
|
|
102
129
|
process.kill(parseInt(cmdOutput.stdout));
|
|
103
130
|
}
|
|
104
131
|
else if (platform === 'win32') {
|
|
105
132
|
const processJson = formatting.parseCsvToJson(cmdOutput.stdout);
|
|
106
|
-
|
|
133
|
+
for (const proc of processJson) {
|
|
107
134
|
process.kill(proc.ProcessId);
|
|
108
|
-
}
|
|
135
|
+
}
|
|
109
136
|
}
|
|
110
137
|
if (this.verbose) {
|
|
111
138
|
await logger.logToStderr('Teams client closed');
|
|
112
139
|
}
|
|
113
140
|
}
|
|
114
|
-
async removeCacheFiles(
|
|
141
|
+
async removeCacheFiles(filePaths, logger) {
|
|
115
142
|
if (this.verbose) {
|
|
116
143
|
await logger.logToStderr('Removing Teams cache files...');
|
|
117
144
|
}
|
|
118
145
|
const platform = process.platform;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
146
|
+
const baseCmd = platform === 'win32' ? 'rmdir /s /q ' : 'rm -r ';
|
|
147
|
+
for (const filePath of filePaths) {
|
|
148
|
+
const cmd = `${baseCmd}"${filePath}"`;
|
|
149
|
+
if (this.debug) {
|
|
150
|
+
await logger.logToStderr(cmd);
|
|
151
|
+
}
|
|
152
|
+
try {
|
|
153
|
+
await this.exec(cmd);
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
if (err?.stderr?.includes('Operation not permitted')) {
|
|
157
|
+
await logger.log('Deleting the folder failed. Please have a look at the following URL to delete the folders manually: https://answers.microsoft.com/en-us/msteams/forum/all/clearing-cache-on-microsoft-teams/35876f6b-eb1a-4b77-bed1-02ce3277091f');
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
throw err;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
130
163
|
}
|
|
131
|
-
await this.exec(cmd);
|
|
132
164
|
}
|
|
133
165
|
}
|
|
134
|
-
_TeamsCacheRemoveCommand_instances = new WeakSet(), _TeamsCacheRemoveCommand_initTelemetry = function _TeamsCacheRemoveCommand_initTelemetry() {
|
|
166
|
+
_a = TeamsCacheRemoveCommand, _TeamsCacheRemoveCommand_instances = new WeakSet(), _TeamsCacheRemoveCommand_initTelemetry = function _TeamsCacheRemoveCommand_initTelemetry() {
|
|
135
167
|
this.telemetry.push((args) => {
|
|
136
168
|
Object.assign(this.telemetryProperties, {
|
|
169
|
+
client: args.options.client,
|
|
137
170
|
force: !!args.options.force
|
|
138
171
|
});
|
|
139
172
|
});
|
|
140
173
|
}, _TeamsCacheRemoveCommand_initOptions = function _TeamsCacheRemoveCommand_initOptions() {
|
|
141
174
|
this.options.unshift({
|
|
175
|
+
option: '-c, --client',
|
|
176
|
+
autocomplete: _a.allowedClients
|
|
177
|
+
}, {
|
|
142
178
|
option: '-f, --force'
|
|
143
179
|
});
|
|
144
180
|
}, _TeamsCacheRemoveCommand_initValidators = function _TeamsCacheRemoveCommand_initValidators() {
|
|
145
|
-
this.validators.push(async () => {
|
|
181
|
+
this.validators.push(async (args) => {
|
|
182
|
+
if (args.options.client && !_a.allowedClients.includes(args.options.client.toLowerCase())) {
|
|
183
|
+
return `'${args.options.client}' is not a valid value for option 'client'. Allowed values are ${_a.allowedClients.join(', ')}`;
|
|
184
|
+
}
|
|
146
185
|
if (process.env.CLIMICROSOFT365_ENV === 'docker') {
|
|
147
186
|
return 'Because you\'re running CLI for Microsoft 365 in a Docker container, we can\'t clear the cache on your host. Instead run this command on your host using "npx ..."';
|
|
148
187
|
}
|
|
@@ -152,5 +191,6 @@ _TeamsCacheRemoveCommand_instances = new WeakSet(), _TeamsCacheRemoveCommand_ini
|
|
|
152
191
|
return true;
|
|
153
192
|
});
|
|
154
193
|
};
|
|
194
|
+
TeamsCacheRemoveCommand.allowedClients = ['new', 'classic'];
|
|
155
195
|
export default new TeamsCacheRemoveCommand();
|
|
156
196
|
//# sourceMappingURL=cache-remove.js.map
|
|
@@ -5,11 +5,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelGetCommand_instances, _TeamsChannelGetCommand_initTelemetry, _TeamsChannelGetCommand_initOptions, _TeamsChannelGetCommand_initValidators, _TeamsChannelGetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
|
-
import { formatting } from '../../../../utils/formatting.js';
|
|
10
8
|
import { validation } from '../../../../utils/validation.js';
|
|
11
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
10
|
import commands from '../../commands.js';
|
|
11
|
+
import { teams } from '../../../../utils/teams.js';
|
|
13
12
|
class TeamsChannelGetCommand extends GraphCommand {
|
|
14
13
|
get name() {
|
|
15
14
|
return commands.CHANNEL_GET;
|
|
@@ -20,63 +19,29 @@ class TeamsChannelGetCommand extends GraphCommand {
|
|
|
20
19
|
constructor() {
|
|
21
20
|
super();
|
|
22
21
|
_TeamsChannelGetCommand_instances.add(this);
|
|
23
|
-
this.teamId = "";
|
|
24
22
|
__classPrivateFieldGet(this, _TeamsChannelGetCommand_instances, "m", _TeamsChannelGetCommand_initTelemetry).call(this);
|
|
25
23
|
__classPrivateFieldGet(this, _TeamsChannelGetCommand_instances, "m", _TeamsChannelGetCommand_initOptions).call(this);
|
|
26
24
|
__classPrivateFieldGet(this, _TeamsChannelGetCommand_instances, "m", _TeamsChannelGetCommand_initValidators).call(this);
|
|
27
25
|
__classPrivateFieldGet(this, _TeamsChannelGetCommand_instances, "m", _TeamsChannelGetCommand_initOptionSets).call(this);
|
|
28
26
|
}
|
|
29
|
-
async getTeamId(args) {
|
|
30
|
-
if (args.options.teamId) {
|
|
31
|
-
return args.options.teamId;
|
|
32
|
-
}
|
|
33
|
-
const group = await entraGroup.getGroupByDisplayName(args.options.teamName);
|
|
34
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
35
|
-
throw `The specified team does not exist in the Microsoft Teams`;
|
|
36
|
-
}
|
|
37
|
-
return group.id;
|
|
38
|
-
}
|
|
39
|
-
async getChannelId(args) {
|
|
40
|
-
if (args.options.id) {
|
|
41
|
-
return args.options.id;
|
|
42
|
-
}
|
|
43
|
-
if (args.options.primary) {
|
|
44
|
-
return '';
|
|
45
|
-
}
|
|
46
|
-
const channelRequestOptions = {
|
|
47
|
-
url: `${this.resource}/v1.0/teams/${formatting.encodeQueryParameter(this.teamId)}/channels?$filter=displayName eq '${formatting.encodeQueryParameter(args.options.name)}'`,
|
|
48
|
-
headers: {
|
|
49
|
-
accept: 'application/json;odata.metadata=none'
|
|
50
|
-
},
|
|
51
|
-
responseType: 'json'
|
|
52
|
-
};
|
|
53
|
-
const response = await request.get(channelRequestOptions);
|
|
54
|
-
const channelItem = response.value[0];
|
|
55
|
-
if (!channelItem) {
|
|
56
|
-
throw `The specified channel does not exist in the Microsoft Teams team`;
|
|
57
|
-
}
|
|
58
|
-
return channelItem.id;
|
|
59
|
-
}
|
|
60
27
|
async commandAction(logger, args) {
|
|
61
28
|
try {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
29
|
+
const teamId = args.options.teamId || await teams.getTeamIdByDisplayName(args.options.teamName);
|
|
30
|
+
let channel;
|
|
31
|
+
if (args.options.primary || args.options.id) {
|
|
32
|
+
const requestOptions = {
|
|
33
|
+
url: `${this.resource}/v1.0/teams/${teamId}/${args.options.primary ? 'primaryChannel' : `channels/${args.options.id}`}`,
|
|
34
|
+
headers: {
|
|
35
|
+
accept: 'application/json;odata.metadata=none'
|
|
36
|
+
},
|
|
37
|
+
responseType: 'json'
|
|
38
|
+
};
|
|
39
|
+
channel = await request.get(requestOptions);
|
|
67
40
|
}
|
|
68
41
|
else {
|
|
69
|
-
|
|
42
|
+
channel = await teams.getChannelByDisplayName(teamId, args.options.name);
|
|
70
43
|
}
|
|
71
|
-
|
|
72
|
-
url: url,
|
|
73
|
-
headers: {
|
|
74
|
-
accept: 'application/json;odata.metadata=none'
|
|
75
|
-
},
|
|
76
|
-
responseType: 'json'
|
|
77
|
-
};
|
|
78
|
-
const res = await request.get(requestOptions);
|
|
79
|
-
await logger.log(res);
|
|
44
|
+
await logger.log(channel);
|
|
80
45
|
}
|
|
81
46
|
catch (err) {
|
|
82
47
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -90,7 +55,7 @@ _TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initT
|
|
|
90
55
|
teamName: typeof args.options.teamName !== 'undefined',
|
|
91
56
|
id: typeof args.options.id !== 'undefined',
|
|
92
57
|
name: typeof args.options.name !== 'undefined',
|
|
93
|
-
primary:
|
|
58
|
+
primary: !!args.options.primary
|
|
94
59
|
});
|
|
95
60
|
});
|
|
96
61
|
}, _TeamsChannelGetCommand_initOptions = function _TeamsChannelGetCommand_initOptions() {
|
|
@@ -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) {
|
|
@@ -5,11 +5,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTeamGetCommand_instances, _TeamsTeamGetCommand_initTelemetry, _TeamsTeamGetCommand_initOptions, _TeamsTeamGetCommand_initValidators, _TeamsTeamGetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
9
|
import { validation } from '../../../../utils/validation.js';
|
|
11
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
11
|
import commands from '../../commands.js';
|
|
12
|
+
import { teams } from '../../../../utils/teams.js';
|
|
13
13
|
class TeamsTeamGetCommand extends GraphCommand {
|
|
14
14
|
get name() {
|
|
15
15
|
return commands.TEAM_GET;
|
|
@@ -25,28 +25,23 @@ class TeamsTeamGetCommand extends GraphCommand {
|
|
|
25
25
|
__classPrivateFieldGet(this, _TeamsTeamGetCommand_instances, "m", _TeamsTeamGetCommand_initValidators).call(this);
|
|
26
26
|
__classPrivateFieldGet(this, _TeamsTeamGetCommand_instances, "m", _TeamsTeamGetCommand_initOptionSets).call(this);
|
|
27
27
|
}
|
|
28
|
-
async getTeamId(args) {
|
|
29
|
-
if (args.options.id) {
|
|
30
|
-
return args.options.id;
|
|
31
|
-
}
|
|
32
|
-
const group = await entraGroup.getGroupByDisplayName(args.options.name);
|
|
33
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
34
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
35
|
-
}
|
|
36
|
-
return group.id;
|
|
37
|
-
}
|
|
38
28
|
async commandAction(logger, args) {
|
|
39
29
|
try {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
30
|
+
let team;
|
|
31
|
+
if (args.options.id) {
|
|
32
|
+
const requestOptions = {
|
|
33
|
+
url: `${this.resource}/v1.0/teams/${formatting.encodeQueryParameter(args.options.id)}`,
|
|
34
|
+
headers: {
|
|
35
|
+
accept: 'application/json;odata.metadata=none'
|
|
36
|
+
},
|
|
37
|
+
responseType: 'json'
|
|
38
|
+
};
|
|
39
|
+
team = await request.get(requestOptions);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
team = await teams.getTeamByDisplayName(args.options.name);
|
|
43
|
+
}
|
|
44
|
+
await logger.log(team);
|
|
50
45
|
}
|
|
51
46
|
catch (err) {
|
|
52
47
|
this.handleRejectedODataJsonPromise(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
|