diff --git a/src/Planner/Planner/Microsoft.Graph.Planner.psd1 b/src/Planner/Planner/Microsoft.Graph.Planner.psd1 index f9eda372597..b7e803a127b 100644 --- a/src/Planner/Planner/Microsoft.Graph.Planner.psd1 +++ b/src/Planner/Planner/Microsoft.Graph.Planner.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 8/25/2020 +# Generated on: 8/13/2021 # @{ @@ -12,13 +12,13 @@ RootModule = './Microsoft.Graph.Planner.psm1' # Version number of this module. -ModuleVersion = '0.9.2' +ModuleVersion = '1.6.0' # Supported PSEditions CompatiblePSEditions = 'Core', 'Desktop' # ID used to uniquely identify this module -GUID = '2e32ec29-c1fe-4c32-a40f-5887ecc3312e' +GUID = '0123fa4f-9cdc-4098-8bfb-8aa89b5da9fa' # Author of this module Author = 'Microsoft Corporation' @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '0.9.1'; }) +RequiredModules = @(@{ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '1.6.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = './bin/Microsoft.Graph.Planner.private.dll' @@ -70,17 +70,9 @@ FormatsToProcess = './Microsoft.Graph.Planner.format.ps1xml' # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = 'Get-MgGroupPlanner', 'Get-MgGroupPlannerPlan', - 'Get-MgGroupPlannerPlanBucket', 'Get-MgGroupPlannerPlanBucketTask', - 'Get-MgGroupPlannerPlanBucketTaskAssignedToTaskBoardFormat', - 'Get-MgGroupPlannerPlanBucketTaskBoardFormat', - 'Get-MgGroupPlannerPlanBucketTaskDetail', - 'Get-MgGroupPlannerPlanBucketTaskProgressTaskBoardFormat', - 'Get-MgGroupPlannerPlanDetail', 'Get-MgGroupPlannerPlanTask', - 'Get-MgGroupPlannerPlanTaskAssignedToTaskBoardFormat', - 'Get-MgGroupPlannerPlanTaskBucketTaskBoardFormat', - 'Get-MgGroupPlannerPlanTaskDetail', - 'Get-MgGroupPlannerPlanTaskProgressTaskBoardFormat', - 'Get-MgPlanner', 'Get-MgPlannerBucket', 'Get-MgPlannerBucketTask', + 'Get-MgGroupPlannerPlanBucket', 'Get-MgGroupPlannerPlanDetail', + 'Get-MgGroupPlannerPlanTask', 'Get-MgPlanner', 'Get-MgPlannerBucket', + 'Get-MgPlannerBucketTask', 'Get-MgPlannerBucketTaskAssignedToTaskBoardFormat', 'Get-MgPlannerBucketTaskBoardFormat', 'Get-MgPlannerBucketTaskDetail', @@ -95,48 +87,22 @@ FunctionsToExport = 'Get-MgGroupPlanner', 'Get-MgGroupPlannerPlan', 'Get-MgPlannerPlanTaskAssignedToTaskBoardFormat', 'Get-MgPlannerPlanTaskBucketTaskBoardFormat', 'Get-MgPlannerPlanTaskDetail', - 'Get-MgPlannerPlanTaskProgressTaskBoardFormat', 'Get-MgPlannerTask', - 'Get-MgPlannerTaskAssignedToTaskBoardFormat', + 'Get-MgPlannerPlanTaskProgressTaskBoardFormat', + 'Get-MgPlannerRoster', 'Get-MgPlannerRosterMember', + 'Get-MgPlannerRosterPlan', 'Get-MgPlannerRosterPlanByRef', + 'Get-MgPlannerTask', 'Get-MgPlannerTaskAssignedToTaskBoardFormat', 'Get-MgPlannerTaskBucketTaskBoardFormat', 'Get-MgPlannerTaskDetail', 'Get-MgPlannerTaskProgressTaskBoardFormat', 'Get-MgUserPlanner', - 'Get-MgUserPlannerFavoritePlan', - 'Get-MgUserPlannerFavoritePlanByRef', 'Get-MgUserPlannerPlan', - 'Get-MgUserPlannerPlanBucket', 'Get-MgUserPlannerPlanBucketTask', - 'Get-MgUserPlannerPlanBucketTaskAssignedToTaskBoardFormat', - 'Get-MgUserPlannerPlanBucketTaskBoardFormat', - 'Get-MgUserPlannerPlanBucketTaskDetail', - 'Get-MgUserPlannerPlanBucketTaskProgressTaskBoardFormat', - 'Get-MgUserPlannerPlanDetail', 'Get-MgUserPlannerPlanTask', - 'Get-MgUserPlannerPlanTaskAssignedToTaskBoardFormat', - 'Get-MgUserPlannerPlanTaskBucketTaskBoardFormat', - 'Get-MgUserPlannerPlanTaskDetail', - 'Get-MgUserPlannerPlanTaskProgressTaskBoardFormat', - 'Get-MgUserPlannerRecentPlan', 'Get-MgUserPlannerRecentPlanByRef', - 'Get-MgUserPlannerTask', - 'Get-MgUserPlannerTaskAssignedToTaskBoardFormat', - 'Get-MgUserPlannerTaskBucketTaskBoardFormat', - 'Get-MgUserPlannerTaskDetail', - 'Get-MgUserPlannerTaskProgressTaskBoardFormat', - 'New-MgGroupPlannerPlan', 'New-MgGroupPlannerPlanBucket', - 'New-MgGroupPlannerPlanBucketTask', 'New-MgGroupPlannerPlanTask', - 'New-MgPlannerBucket', 'New-MgPlannerBucketTask', 'New-MgPlannerPlan', + 'Get-MgUserPlannerFavoritePlan', 'Get-MgUserPlannerPlan', + 'Get-MgUserPlannerRecentPlan', 'Get-MgUserPlannerRosterPlan', + 'Get-MgUserPlannerTask', 'New-MgGroupPlannerPlanBucket', + 'New-MgGroupPlannerPlanTask', 'New-MgPlannerBucket', + 'New-MgPlannerBucketTask', 'New-MgPlannerPlan', 'New-MgPlannerPlanBucket', 'New-MgPlannerPlanBucketTask', - 'New-MgPlannerPlanTask', 'New-MgPlannerTask', - 'New-MgUserPlannerFavoritePlanByRef', 'New-MgUserPlannerPlan', - 'New-MgUserPlannerPlanBucket', 'New-MgUserPlannerPlanBucketTask', - 'New-MgUserPlannerPlanTask', 'New-MgUserPlannerRecentPlanByRef', - 'New-MgUserPlannerTask', 'Remove-MgGroupPlanner', - 'Remove-MgGroupPlannerPlan', 'Remove-MgGroupPlannerPlanBucket', - 'Remove-MgGroupPlannerPlanBucketTask', - 'Remove-MgGroupPlannerPlanBucketTaskAssignedToTaskBoardFormat', - 'Remove-MgGroupPlannerPlanBucketTaskBoardFormat', - 'Remove-MgGroupPlannerPlanBucketTaskDetail', - 'Remove-MgGroupPlannerPlanBucketTaskProgressTaskBoardFormat', + 'New-MgPlannerPlanTask', 'New-MgPlannerRoster', + 'New-MgPlannerRosterMember', 'New-MgPlannerRosterPlanByRef', + 'New-MgPlannerTask', 'Remove-MgGroupPlannerPlanBucket', 'Remove-MgGroupPlannerPlanDetail', 'Remove-MgGroupPlannerPlanTask', - 'Remove-MgGroupPlannerPlanTaskAssignedToTaskBoardFormat', - 'Remove-MgGroupPlannerPlanTaskBucketTaskBoardFormat', - 'Remove-MgGroupPlannerPlanTaskDetail', - 'Remove-MgGroupPlannerPlanTaskProgressTaskBoardFormat', 'Remove-MgPlannerBucket', 'Remove-MgPlannerBucketTask', 'Remove-MgPlannerBucketTaskAssignedToTaskBoardFormat', 'Remove-MgPlannerBucketTaskBoardFormat', @@ -153,40 +119,14 @@ FunctionsToExport = 'Get-MgGroupPlanner', 'Get-MgGroupPlannerPlan', 'Remove-MgPlannerPlanTaskBucketTaskBoardFormat', 'Remove-MgPlannerPlanTaskDetail', 'Remove-MgPlannerPlanTaskProgressTaskBoardFormat', + 'Remove-MgPlannerRoster', 'Remove-MgPlannerRosterMember', 'Remove-MgPlannerTask', 'Remove-MgPlannerTaskAssignedToTaskBoardFormat', 'Remove-MgPlannerTaskBucketTaskBoardFormat', 'Remove-MgPlannerTaskDetail', 'Remove-MgPlannerTaskProgressTaskBoardFormat', - 'Remove-MgUserPlanner', 'Remove-MgUserPlannerPlan', - 'Remove-MgUserPlannerPlanBucket', - 'Remove-MgUserPlannerPlanBucketTask', - 'Remove-MgUserPlannerPlanBucketTaskAssignedToTaskBoardFormat', - 'Remove-MgUserPlannerPlanBucketTaskBoardFormat', - 'Remove-MgUserPlannerPlanBucketTaskDetail', - 'Remove-MgUserPlannerPlanBucketTaskProgressTaskBoardFormat', - 'Remove-MgUserPlannerPlanDetail', 'Remove-MgUserPlannerPlanTask', - 'Remove-MgUserPlannerPlanTaskAssignedToTaskBoardFormat', - 'Remove-MgUserPlannerPlanTaskBucketTaskBoardFormat', - 'Remove-MgUserPlannerPlanTaskDetail', - 'Remove-MgUserPlannerPlanTaskProgressTaskBoardFormat', - 'Remove-MgUserPlannerTask', - 'Remove-MgUserPlannerTaskAssignedToTaskBoardFormat', - 'Remove-MgUserPlannerTaskBucketTaskBoardFormat', - 'Remove-MgUserPlannerTaskDetail', - 'Remove-MgUserPlannerTaskProgressTaskBoardFormat', - 'Update-MgGroupPlanner', 'Update-MgGroupPlannerPlan', - 'Update-MgGroupPlannerPlanBucket', - 'Update-MgGroupPlannerPlanBucketTask', - 'Update-MgGroupPlannerPlanBucketTaskAssignedToTaskBoardFormat', - 'Update-MgGroupPlannerPlanBucketTaskBoardFormat', - 'Update-MgGroupPlannerPlanBucketTaskDetail', - 'Update-MgGroupPlannerPlanBucketTaskProgressTaskBoardFormat', + 'Update-MgGroupPlanner', 'Update-MgGroupPlannerPlanBucket', 'Update-MgGroupPlannerPlanDetail', 'Update-MgGroupPlannerPlanTask', - 'Update-MgGroupPlannerPlanTaskAssignedToTaskBoardFormat', - 'Update-MgGroupPlannerPlanTaskBucketTaskBoardFormat', - 'Update-MgGroupPlannerPlanTaskDetail', - 'Update-MgGroupPlannerPlanTaskProgressTaskBoardFormat', 'Update-MgPlanner', 'Update-MgPlannerBucket', 'Update-MgPlannerBucketTask', 'Update-MgPlannerBucketTaskAssignedToTaskBoardFormat', @@ -204,28 +144,13 @@ FunctionsToExport = 'Get-MgGroupPlanner', 'Get-MgGroupPlannerPlan', 'Update-MgPlannerPlanTaskBucketTaskBoardFormat', 'Update-MgPlannerPlanTaskDetail', 'Update-MgPlannerPlanTaskProgressTaskBoardFormat', + 'Update-MgPlannerRoster', 'Update-MgPlannerRosterMember', 'Update-MgPlannerTask', 'Update-MgPlannerTaskAssignedToTaskBoardFormat', 'Update-MgPlannerTaskBucketTaskBoardFormat', 'Update-MgPlannerTaskDetail', 'Update-MgPlannerTaskProgressTaskBoardFormat', - 'Update-MgUserPlanner', 'Update-MgUserPlannerPlan', - 'Update-MgUserPlannerPlanBucket', - 'Update-MgUserPlannerPlanBucketTask', - 'Update-MgUserPlannerPlanBucketTaskAssignedToTaskBoardFormat', - 'Update-MgUserPlannerPlanBucketTaskBoardFormat', - 'Update-MgUserPlannerPlanBucketTaskDetail', - 'Update-MgUserPlannerPlanBucketTaskProgressTaskBoardFormat', - 'Update-MgUserPlannerPlanDetail', 'Update-MgUserPlannerPlanTask', - 'Update-MgUserPlannerPlanTaskAssignedToTaskBoardFormat', - 'Update-MgUserPlannerPlanTaskBucketTaskBoardFormat', - 'Update-MgUserPlannerPlanTaskDetail', - 'Update-MgUserPlannerPlanTaskProgressTaskBoardFormat', - 'Update-MgUserPlannerTask', - 'Update-MgUserPlannerTaskAssignedToTaskBoardFormat', - 'Update-MgUserPlannerTaskBucketTaskBoardFormat', - 'Update-MgUserPlannerTaskDetail', - 'Update-MgUserPlannerTaskProgressTaskBoardFormat' + 'Update-MgUserPlanner' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() @@ -263,7 +188,7 @@ PrivateData = @{ ProjectUri = 'https://github.com/microsoftgraph/msgraph-sdk-powershell' # A URL to an icon representing this module. - IconUri = 'https://raw.githubusercontent.com/microsoftgraph/g-raph/master/g-raph.png' + IconUri = 'https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/master/documentation/images/graph_color256.png' # ReleaseNotes of this module ReleaseNotes = 'See https://aka.ms/GraphPowerShell-Release.' diff --git a/src/Planner/Planner/readme.md b/src/Planner/Planner/readme.md index aba0699ba9e..1692040eeec 100644 --- a/src/Planner/Planner/readme.md +++ b/src/Planner/Planner/readme.md @@ -41,7 +41,32 @@ subject-prefix: '' directive: # Remove paths that are not valid. - remove-path-by-operation: ^users.planner_(Create|Update|Delete)All$ - +# Remove cmdlets + - where: + verb: Remove + subject: ^(User|Group)Planner$ + remove: true + - where: + verb: Remove|New|Update + subject: ^(User|Group)Planner(Task|Plan)$ + remove: true + # Only list is supported. + - where: + verb: Get + variant: Get.* + subject: ^UserPlanner(Task|Plan)$ + remove: true + - where: + verb: Get + variant: Get.* + subject: ^UserPlannerPlanTask$ + remove: true + - where: + subject: ^UserPlanner(Task[A-Z].*|Plan[A-Z].*)$ + remove: true + - where: + subject: ^GroupPlanner(PlanBucket[A-Z].*|PlanTask[A-Z].*)$ + remove: true ``` ### Versioning diff --git a/src/Planner/Planner/test/Microsoft.Graph.Planner.Tests.ps1 b/src/Planner/Planner/test/Microsoft.Graph.Planner.Tests.ps1 new file mode 100644 index 00000000000..587991319b1 --- /dev/null +++ b/src/Planner/Planner/test/Microsoft.Graph.Planner.Tests.ps1 @@ -0,0 +1,63 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Teams module" { + BeforeAll { + $ModuleName = "Microsoft.Graph.Teams" + $ModulePath = Join-Path $PSScriptRoot "..\$ModuleName.psd1" + $PSModuleInfo = Import-Module $ModulePath -Force -PassThru + } + + AfterAll { + Remove-Module $ModuleName -Force + } + + Context "On module import" { + It 'Should be compatible with PS core and desktop' { + { + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } | Should -Not -Throw + } + + It 'Should point to script module' { + { + $PSModuleInfo.Path | Should -BeLikeExactly "*$ModuleName.psm1" + } | Should -Not -Throw + } + + It 'Should have a definition' { + { + $PSModuleInfo.Definition | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Should not export suppressed commands' { + { + $SuppressedCommands = @( + "Update-MgUserPlannerTask", + "New-MgUserPlannerTask", + "Remove-MgUserPlannerTask", + "Get-MgUserPlannerPlanTask", + "Get-MgUserPlannerFavoritePlanByRef", + "New-MgUserPlannerFavoritePlanByRef", + "New-MgUserPlannerPlanTask", + "Remove-MgUserPlannerPlanTask" + ) + + $SuppressedCommands | Should -Not -BeIn $PSModuleInfo.ExportedCommands.Keys + } | Should -Not -Throw + } + + It 'Should export expected commands' { + { + $ExpectedCommands = @( + "Get-MgUserPlannerTask", + "Get-MgUserPlannerFavoritePlan" + ) + + $ExpectedCommands | Should -BeIn $PSModuleInfo.ExportedCommands.Keys + } | Should -Not -Throw + } + } +} \ No newline at end of file diff --git a/src/Teams/Teams/Microsoft.Graph.Teams.psd1 b/src/Teams/Teams/Microsoft.Graph.Teams.psd1 index db3a98025ca..1e19d733a94 100644 --- a/src/Teams/Teams/Microsoft.Graph.Teams.psd1 +++ b/src/Teams/Teams/Microsoft.Graph.Teams.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 8/25/2020 +# Generated on: 8/13/2021 # @{ @@ -12,13 +12,13 @@ RootModule = './Microsoft.Graph.Teams.psm1' # Version number of this module. -ModuleVersion = '0.9.2' +ModuleVersion = '1.6.2' # Supported PSEditions CompatiblePSEditions = 'Core', 'Desktop' # ID used to uniquely identify this module -GUID = 'ea137b5f-b6f9-4808-95a1-e18b82cb3f4a' +GUID = 'd26de1af-70e9-45b8-991b-abd353d9b8fd' # Author of this module Author = 'Microsoft Corporation' @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '0.9.1'; }) +RequiredModules = @(@{ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '1.6.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = './bin/Microsoft.Graph.Teams.private.dll' @@ -69,17 +69,31 @@ FormatsToProcess = './Microsoft.Graph.Teams.format.ps1xml' # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Copy-MgTeam', 'Get-MgChat', 'Get-MgChatInstalledApp', +FunctionsToExport = 'Add-MgChatMember', 'Add-MgTeamChannelMember', 'Add-MgTeamMember', + 'Add-MgTeamPrimaryChannelMember', 'Complete-MgTeamChannelMigration', + 'Complete-MgTeamMigration', + 'Complete-MgTeamPrimaryChannelMigration', + 'Confirm-MgTeamScheduleTimeCard', 'Copy-MgTeam', + 'Get-MgAppCatalogTeamApp', 'Get-MgAppCatalogTeamAppDefinition', + 'Get-MgAppCatalogTeamAppDefinitionBot', + 'Get-MgAppCatalogTeamAppDefinitionColorIcon', + 'Get-MgAppCatalogTeamAppDefinitionColorIconHostedContent', + 'Get-MgAppCatalogTeamAppDefinitionOutlineIcon', + 'Get-MgAppCatalogTeamAppDefinitionOutlineIconHostedContent', + 'Get-MgChat', 'Get-MgChatInstalledApp', 'Get-MgChatInstalledAppTeamApp', 'Get-MgChatInstalledAppTeamAppByRef', 'Get-MgChatInstalledAppTeamAppDefinition', - 'Get-MgChatInstalledAppTeamAppDefinitionByRef', 'Get-MgChatMember', + 'Get-MgChatInstalledAppTeamAppDefinitionByRef', + 'Get-MgChatLastMessagePreview', 'Get-MgChatMember', 'Get-MgChatMessage', 'Get-MgChatMessageDelta', 'Get-MgChatMessageHostedContent', 'Get-MgChatMessageReply', - 'Get-MgChatMessageReplyDelta', 'Get-MgGroupTeam', 'Get-MgTeam', + 'Get-MgChatMessageReplyDelta', 'Get-MgChatOperation', + 'Get-MgChatPermissionGrant', 'Get-MgChatTab', 'Get-MgChatTabTeamApp', + 'Get-MgChatTabTeamAppByRef', 'Get-MgGroupTeam', 'Get-MgTeam', 'Get-MgTeamChannel', 'Get-MgTeamChannelFileFolder', - 'Get-MgTeamChannelMember', 'Get-MgTeamChannelMessage', - 'Get-MgTeamChannelMessageDelta', + 'Get-MgTeamChannelFileFolderContent', 'Get-MgTeamChannelMember', + 'Get-MgTeamChannelMessage', 'Get-MgTeamChannelMessageDelta', 'Get-MgTeamChannelMessageHostedContent', 'Get-MgTeamChannelMessageReply', 'Get-MgTeamChannelMessageReplyDelta', 'Get-MgTeamChannelTab', @@ -89,9 +103,11 @@ FunctionsToExport = 'Copy-MgTeam', 'Get-MgChat', 'Get-MgChatInstalledApp', 'Get-MgTeamInstalledAppTeamAppByRef', 'Get-MgTeamInstalledAppTeamAppDefinition', 'Get-MgTeamInstalledAppTeamAppDefinitionByRef', 'Get-MgTeamMember', - 'Get-MgTeamOperation', 'Get-MgTeamOwner', 'Get-MgTeamOwnerByRef', - 'Get-MgTeamPhoto', 'Get-MgTeamPrimaryChannel', - 'Get-MgTeamPrimaryChannelFileFolder', + 'Get-MgTeamMessage', 'Get-MgTeamOperation', 'Get-MgTeamOwner', + 'Get-MgTeamOwnerByRef', 'Get-MgTeamPermissionGrant', + 'Get-MgTeamPhoto', 'Get-MgTeamPhotoContent', + 'Get-MgTeamPrimaryChannel', 'Get-MgTeamPrimaryChannelFileFolder', + 'Get-MgTeamPrimaryChannelFileFolderContent', 'Get-MgTeamPrimaryChannelMember', 'Get-MgTeamPrimaryChannelMessage', 'Get-MgTeamPrimaryChannelMessageDelta', 'Get-MgTeamPrimaryChannelMessageHostedContent', @@ -104,24 +120,32 @@ FunctionsToExport = 'Copy-MgTeam', 'Get-MgChat', 'Get-MgChatInstalledApp', 'Get-MgTeamScheduleOpenShiftChangeRequest', 'Get-MgTeamScheduleSchedulingGroup', 'Get-MgTeamScheduleShift', 'Get-MgTeamScheduleSwapShiftChangeRequest', - 'Get-MgTeamScheduleTimeOff', 'Get-MgTeamScheduleTimeOffReason', - 'Get-MgTeamScheduleTimeOffRequest', 'Get-MgTeamTemplate', + 'Get-MgTeamScheduleTimeCard', 'Get-MgTeamScheduleTimeOff', + 'Get-MgTeamScheduleTimeOffReason', + 'Get-MgTeamScheduleTimeOffRequest', 'Get-MgTeamTag', + 'Get-MgTeamTagMember', 'Get-MgTeamTemplate', 'Get-MgTeamTemplateByRef', 'Get-MgTeamwork', 'Get-MgTeamworkWorkforceIntegration', 'Get-MgUserChat', - 'Get-MgUserJoinedTeam', 'Get-MgUserTeamwork', - 'Get-MgUserTeamworkInstalledApp', + 'Get-MgUserJoinedTeam', 'Get-MgUserJoinedTeamByRef', + 'Get-MgUserTeamwork', 'Get-MgUserTeamworkInstalledApp', 'Get-MgUserTeamworkInstalledAppChat', 'Get-MgUserTeamworkInstalledAppChatByRef', 'Invoke-MgArchiveTeam', - 'Invoke-MgMessageChat', 'Invoke-MgMessageTeam', - 'Invoke-MgMessageTeamChannel', 'Invoke-MgShareTeamSchedule', - 'Invoke-MgUnarchiveTeam', 'New-MgChat', 'New-MgChatInstalledApp', - 'New-MgChatMember', 'New-MgChatMessage', - 'New-MgChatMessageHostedContent', 'New-MgChatMessageReply', - 'New-MgTeam', 'New-MgTeamChannel', 'New-MgTeamChannelMember', - 'New-MgTeamChannelMessage', 'New-MgTeamChannelMessageHostedContent', + 'Invoke-MgClockTeamScheduleTimeCardIn', + 'Invoke-MgClockTeamScheduleTimeCardOut', 'Invoke-MgMessageChat', + 'Invoke-MgMessageTeam', 'Invoke-MgMessageTeamChannel', + 'Invoke-MgShareTeamSchedule', 'Invoke-MgUnarchiveTeam', + 'New-MgAppCatalogTeamApp', 'New-MgAppCatalogTeamAppDefinition', + 'New-MgChat', 'New-MgChatInstalledApp', 'New-MgChatMember', + 'New-MgChatMessage', 'New-MgChatMessageHostedContent', + 'New-MgChatMessageReply', 'New-MgChatOperation', + 'New-MgChatPermissionGrant', 'New-MgChatTab', 'New-MgTeam', + 'New-MgTeamChannel', 'New-MgTeamChannelEmail', + 'New-MgTeamChannelMember', 'New-MgTeamChannelMessage', + 'New-MgTeamChannelMessageHostedContent', 'New-MgTeamChannelMessageReply', 'New-MgTeamChannelTab', 'New-MgTeamInstalledApp', 'New-MgTeamMember', 'New-MgTeamOperation', - 'New-MgTeamOwnerByRef', 'New-MgTeamPrimaryChannelMember', + 'New-MgTeamOwnerByRef', 'New-MgTeamPermissionGrant', + 'New-MgTeamPrimaryChannelEmail', 'New-MgTeamPrimaryChannelMember', 'New-MgTeamPrimaryChannelMessage', 'New-MgTeamPrimaryChannelMessageHostedContent', 'New-MgTeamPrimaryChannelMessageReply', @@ -131,31 +155,36 @@ FunctionsToExport = 'Copy-MgTeam', 'Get-MgChat', 'Get-MgChatInstalledApp', 'New-MgTeamScheduleOpenShiftChangeRequest', 'New-MgTeamScheduleSchedulingGroup', 'New-MgTeamScheduleShift', 'New-MgTeamScheduleSwapShiftChangeRequest', - 'New-MgTeamScheduleTimeOff', 'New-MgTeamScheduleTimeOffReason', - 'New-MgTeamScheduleTimeOffRequest', - 'New-MgTeamworkWorkforceIntegration', 'New-MgUserChat', - 'New-MgUserJoinedTeam', 'New-MgUserTeamworkInstalledApp', + 'New-MgTeamScheduleTimeCard', 'New-MgTeamScheduleTimeOff', + 'New-MgTeamScheduleTimeOffReason', + 'New-MgTeamScheduleTimeOffRequest', 'New-MgTeamTag', + 'New-MgTeamTagMember', 'New-MgTeamworkWorkforceIntegration', + 'New-MgUserChat', 'New-MgUserJoinedTeam', 'New-MgUserJoinedTeamByRef', + 'New-MgUserTeamworkInstalledApp', 'Remove-MgAppCatalogTeamApp', + 'Remove-MgAppCatalogTeamAppDefinition', + 'Remove-MgAppCatalogTeamAppDefinitionBot', + 'Remove-MgAppCatalogTeamAppDefinitionColorIcon', + 'Remove-MgAppCatalogTeamAppDefinitionColorIconHostedContent', + 'Remove-MgAppCatalogTeamAppDefinitionOutlineIcon', + 'Remove-MgAppCatalogTeamAppDefinitionOutlineIconHostedContent', 'Remove-MgChat', 'Remove-MgChatInstalledApp', 'Remove-MgChatInstalledAppTeamAppByRef', 'Remove-MgChatInstalledAppTeamAppDefinitionByRef', - 'Remove-MgChatMember', 'Remove-MgChatMessage', - 'Remove-MgChatMessageHostedContent', 'Remove-MgChatMessageReply', + 'Remove-MgChatLastMessagePreview', 'Remove-MgChatMember', + 'Remove-MgChatOperation', 'Remove-MgChatPermissionGrant', + 'Remove-MgChatTab', 'Remove-MgChatTabTeamAppByRef', 'Remove-MgGroupTeam', 'Remove-MgTeam', 'Remove-MgTeamChannel', - 'Remove-MgTeamChannelFileFolder', 'Remove-MgTeamChannelMember', - 'Remove-MgTeamChannelMessage', - 'Remove-MgTeamChannelMessageHostedContent', - 'Remove-MgTeamChannelMessageReply', 'Remove-MgTeamChannelTab', + 'Remove-MgTeamChannelEmail', 'Remove-MgTeamChannelFileFolder', + 'Remove-MgTeamChannelMember', 'Remove-MgTeamChannelTab', 'Remove-MgTeamChannelTabTeamAppByRef', 'Remove-MgTeamGroupByRef', 'Remove-MgTeamInstalledApp', 'Remove-MgTeamInstalledAppTeamAppByRef', 'Remove-MgTeamInstalledAppTeamAppDefinitionByRef', - 'Remove-MgTeamMember', 'Remove-MgTeamOperation', 'Remove-MgTeamPhoto', - 'Remove-MgTeamPrimaryChannel', + 'Remove-MgTeamMember', 'Remove-MgTeamOperation', + 'Remove-MgTeamPermissionGrant', 'Remove-MgTeamPhoto', + 'Remove-MgTeamPrimaryChannel', 'Remove-MgTeamPrimaryChannelEmail', 'Remove-MgTeamPrimaryChannelFileFolder', 'Remove-MgTeamPrimaryChannelMember', - 'Remove-MgTeamPrimaryChannelMessage', - 'Remove-MgTeamPrimaryChannelMessageHostedContent', - 'Remove-MgTeamPrimaryChannelMessageReply', 'Remove-MgTeamPrimaryChannelTab', 'Remove-MgTeamPrimaryChannelTabTeamAppByRef', 'Remove-MgTeamSchedule', 'Remove-MgTeamScheduleOfferShiftRequest', @@ -164,37 +193,51 @@ FunctionsToExport = 'Copy-MgTeam', 'Get-MgChat', 'Get-MgChatInstalledApp', 'Remove-MgTeamScheduleSchedulingGroup', 'Remove-MgTeamScheduleShift', 'Remove-MgTeamScheduleSwapShiftChangeRequest', - 'Remove-MgTeamScheduleTimeOff', + 'Remove-MgTeamScheduleTimeCard', 'Remove-MgTeamScheduleTimeOff', 'Remove-MgTeamScheduleTimeOffReason', - 'Remove-MgTeamScheduleTimeOffRequest', 'Remove-MgTeamTemplateByRef', + 'Remove-MgTeamScheduleTimeOffRequest', 'Remove-MgTeamTag', + 'Remove-MgTeamTagMember', 'Remove-MgTeamTemplateByRef', 'Remove-MgTeamworkWorkforceIntegration', 'Remove-MgUserChat', 'Remove-MgUserJoinedTeam', 'Remove-MgUserTeamwork', 'Remove-MgUserTeamworkInstalledApp', 'Remove-MgUserTeamworkInstalledAppChatByRef', 'Send-MgChatActivityNotification', 'Send-MgTeamActivityNotification', + 'Set-MgAppCatalogTeamAppDefinitionColorIconHostedContent', + 'Set-MgAppCatalogTeamAppDefinitionOutlineIconHostedContent', 'Set-MgChatInstalledAppTeamAppByRef', 'Set-MgChatInstalledAppTeamAppDefinitionByRef', + 'Set-MgChatTabTeamAppByRef', 'Set-MgTeamChannelFileFolderContent', 'Set-MgTeamChannelTabTeamAppByRef', 'Set-MgTeamGroupByRef', 'Set-MgTeamInstalledAppTeamAppByRef', 'Set-MgTeamInstalledAppTeamAppDefinitionByRef', + 'Set-MgTeamPhotoContent', + 'Set-MgTeamPrimaryChannelFileFolderContent', 'Set-MgTeamPrimaryChannelTabTeamAppByRef', 'Set-MgTeamTemplateByRef', - 'Set-MgUserTeamworkInstalledAppChatByRef', 'Update-MgChat', - 'Update-MgChatInstalledApp', 'Update-MgChatMember', - 'Update-MgChatMessage', 'Update-MgChatMessageHostedContent', - 'Update-MgChatMessageReply', 'Update-MgGroupTeam', 'Update-MgTeam', + 'Set-MgUserTeamworkInstalledAppChatByRef', + 'Start-MgTeamScheduleTimeCardBreak', + 'Stop-MgTeamScheduleTimeCardBreak', 'Update-MgAppCatalogTeamApp', + 'Update-MgAppCatalogTeamAppDefinition', + 'Update-MgAppCatalogTeamAppDefinitionBot', + 'Update-MgAppCatalogTeamAppDefinitionColorIcon', + 'Update-MgAppCatalogTeamAppDefinitionColorIconHostedContent', + 'Update-MgAppCatalogTeamAppDefinitionOutlineIcon', + 'Update-MgAppCatalogTeamAppDefinitionOutlineIconHostedContent', + 'Update-MgChat', 'Update-MgChatInstalledApp', + 'Update-MgChatLastMessagePreview', 'Update-MgChatMember', + 'Update-MgChatMessage', 'Update-MgChatMessageReply', + 'Update-MgChatOperation', 'Update-MgChatPermissionGrant', + 'Update-MgChatTab', 'Update-MgGroupTeam', 'Update-MgTeam', 'Update-MgTeamChannel', 'Update-MgTeamChannelFileFolder', 'Update-MgTeamChannelMember', 'Update-MgTeamChannelMessage', - 'Update-MgTeamChannelMessageHostedContent', 'Update-MgTeamChannelMessageReply', 'Update-MgTeamChannelTab', 'Update-MgTeamInstalledApp', 'Update-MgTeamMember', - 'Update-MgTeamOperation', 'Update-MgTeamPhoto', - 'Update-MgTeamPrimaryChannel', + 'Update-MgTeamOperation', 'Update-MgTeamPermissionGrant', + 'Update-MgTeamPhoto', 'Update-MgTeamPrimaryChannel', 'Update-MgTeamPrimaryChannelFileFolder', 'Update-MgTeamPrimaryChannelMember', 'Update-MgTeamPrimaryChannelMessage', - 'Update-MgTeamPrimaryChannelMessageHostedContent', 'Update-MgTeamPrimaryChannelMessageReply', 'Update-MgTeamPrimaryChannelTab', 'Update-MgTeamSchedule', 'Update-MgTeamScheduleOfferShiftRequest', @@ -203,9 +246,10 @@ FunctionsToExport = 'Copy-MgTeam', 'Get-MgChat', 'Get-MgChatInstalledApp', 'Update-MgTeamScheduleSchedulingGroup', 'Update-MgTeamScheduleShift', 'Update-MgTeamScheduleSwapShiftChangeRequest', - 'Update-MgTeamScheduleTimeOff', + 'Update-MgTeamScheduleTimeCard', 'Update-MgTeamScheduleTimeOff', 'Update-MgTeamScheduleTimeOffReason', - 'Update-MgTeamScheduleTimeOffRequest', 'Update-MgTeamwork', + 'Update-MgTeamScheduleTimeOffRequest', 'Update-MgTeamTag', + 'Update-MgTeamTagMember', 'Update-MgTeamwork', 'Update-MgTeamworkWorkforceIntegration', 'Update-MgUserChat', 'Update-MgUserJoinedTeam', 'Update-MgUserTeamwork', 'Update-MgUserTeamworkInstalledApp' @@ -246,7 +290,7 @@ PrivateData = @{ ProjectUri = 'https://github.com/microsoftgraph/msgraph-sdk-powershell' # A URL to an icon representing this module. - IconUri = 'https://raw.githubusercontent.com/microsoftgraph/g-raph/master/g-raph.png' + IconUri = 'https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/master/documentation/images/graph_color256.png' # ReleaseNotes of this module ReleaseNotes = 'See https://aka.ms/GraphPowerShell-Release.' diff --git a/src/Teams/Teams/readme.md b/src/Teams/Teams/readme.md index f3aa530a02c..6a14a175a85 100644 --- a/src/Teams/Teams/readme.md +++ b/src/Teams/Teams/readme.md @@ -40,6 +40,19 @@ subject-prefix: '' directive: # Remove invalid paths. - remove-path-by-operation: teams_GetGroup|team_ListTeam +# Remove cmdlets + - where: + verb: Remove + subject: ^(Chat|TeamChannel|TeamPrimaryChannel)Message$ + remove: true + - where: + verb: Remove + subject: ^(Chat|TeamChannel|TeamPrimaryChannel)MessageReply$ + remove: true + - where: + verb: Remove|Update + subject: ^(Chat|TeamChannel|TeamPrimaryChannel)MessageHostedContent$ + remove: true ``` ### Versioning diff --git a/src/Teams/Teams/test/Microsoft.Graph.Teams.Tests.ps1 b/src/Teams/Teams/test/Microsoft.Graph.Teams.Tests.ps1 new file mode 100644 index 00000000000..3919db3ea00 --- /dev/null +++ b/src/Teams/Teams/test/Microsoft.Graph.Teams.Tests.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Teams module" { + BeforeAll { + $ModuleName = "Microsoft.Graph.Teams" + $ModulePath = Join-Path $PSScriptRoot "..\$ModuleName.psd1" + $PSModuleInfo = Import-Module $ModulePath -Force -PassThru + } + + AfterAll { + Remove-Module $ModuleName -Force + } + + Context "On module import" { + It 'Should be compatible with PS core and desktop' { + { + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } | Should -Not -Throw + } + + It 'Should point to script module' { + { + $PSModuleInfo.Path | Should -BeLikeExactly "*$ModuleName.psm1" + } | Should -Not -Throw + } + + It 'Should have a definition' { + { + $PSModuleInfo.Definition | Should -Not -BeNullOrEmpty + } | Should -Not -Throw + } + + It 'Should not export suppressed commands' { + { + $SuppressedCommands = @( + "Remove-MgChatMessage", + "Remove-MgChatMessageHostedContent", + "Remove-MgTeamChannelMessageReply", + "Remove-MgTeamPrimaryChannelMessageReply", + "Update-MgTeamPrimaryChannelMessageHostedContent", + "Update-MgTeamChannelMessageHostedContent" + ) + + $SuppressedCommands | Should -Not -BeIn $PSModuleInfo.ExportedCommands.Keys + } | Should -Not -Throw + } + + It 'Should export expected commands' { + { + $ExpectedCommands = @( + "Get-MgChatMessage", + "Get-MgTeamChannelMessageReply", + "Get-MgTeamChannelMessageHostedContent", + "New-MgTeamChannelMessage", + "New-MgTeamPrimaryChannelMessageReply", + "New-MgTeamChannelMessageHostedContent", + "Update-MgTeamPrimaryChannelMessage", + "Update-MgChatMessageReply" + ) + + $ExpectedCommands | Should -BeIn $PSModuleInfo.ExportedCommands.Keys + } | Should -Not -Throw + } + } +} \ No newline at end of file diff --git a/src/readme.graph.md b/src/readme.graph.md index d9f2a7550c2..553d858ebe2 100644 --- a/src/readme.graph.md +++ b/src/readme.graph.md @@ -409,6 +409,12 @@ directive: subject: ^(\w*[a-z])Ref([A-Z]\w*)$ set: subject: $1$2ByRef +# Remove *ByRef commands + - where: + verb: Get|Remove|New + subject: ^UserPlanner(FavoritePlanByRef|RecentPlanByRef|RosterPlanByRef)$ + remove: true +# Rename *ByRef commands - where: verb: Get|New subject: ^GroupMemberByRef$