Skip to content

Commit

Permalink
Add creation command for view entities. Version 1.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
homotechsual committed Jul 11, 2024
1 parent 9cebda0 commit bf3f7c9
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 2 deletions.
20 changes: 18 additions & 2 deletions HaloAPI.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = '.\HaloAPI.psm1'

# Version number of this module.
ModuleVersion = '1.21.2'
ModuleVersion = '1.22.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -118,6 +118,10 @@
'Get-HaloTicketType',
'Get-HaloTimesheet',
'Get-HaloUser',
'Get-HaloViewColumn',
'Get-HaloViewFilter',
'Get-HaloViewListGroup',
'Get-HaloViewList',
'Get-HaloWorkday',
'Get-HaloWorkflow',
'Get-HaloWorkflows',
Expand Down Expand Up @@ -186,6 +190,10 @@
'New-HaloTicketTypeBatch',
'New-HaloUser',
'New-HaloUserBatch',
'New-HaloViewColumn',
'New-HaloViewFilter',
'New-HaloViewListGroup',
'New-HaloViewList',
'New-HaloWorkday',
'New-HaloWorkflow',
'New-HaloWorkflowBatch',
Expand Down Expand Up @@ -221,6 +229,10 @@
'Remove-HaloTicketBatch',
'Remove-HaloTicketRules',
'Remove-HaloUser',
'Remove-HaloViewColumn',
'Remove-HaloViewFilter',
'Remove-HaloViewListGroup',
'Remove-HaloViewList',
'Restore-HaloTicket',
'Set-HaloAction',
'Set-HaloActionBatch',
Expand Down Expand Up @@ -257,6 +269,10 @@
'Set-HaloTicketRules',
'Set-HaloTicketType',
'Set-HaloUser',
'Set-HaloViewColumn',
'Set-HaloViewFilter',
'Set-HaloViewListGroup',
'Set-HaloViewList',
'Set-HaloWorkday'
)

Expand Down Expand Up @@ -296,7 +312,7 @@
IconUri = 'https://3c3br937rz386088k2z3qqdi-wpengine.netdna-ssl.com/wp-content/uploads/2020/04/HaloIcon-300x300.png'

# ReleaseNotes of this module
ReleaseNotes = 'Release 1.21.2'
ReleaseNotes = 'https://github.com/homotechsual/HaloAPI/releases/tag/1.22.0'

# Prerelease string of this module
# Prerelease = 'Beta1'
Expand Down
25 changes: 25 additions & 0 deletions Public/New/New-HaloViewColumn.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Function New-HaloViewColumn {
<#
.SYNOPSIS
Creates one or more viewcolumns via the Halo API.
.DESCRIPTION
Function to send an viewcolumn creation request to the Halo API
.OUTPUTS
Outputs an object containing the response from the web request.
#>
[CmdletBinding( SupportsShouldProcess = $True )]
[OutputType([Object[]])]
Param (
# Object or array of objects containing properties and values used to create one or more new viewcolumns.
[Parameter( Mandatory = $True )]
[Object[]]$ViewColumn
)
Invoke-HaloPreFlightCheck
try {
if ($PSCmdlet.ShouldProcess($ViewColumn -is [Array] ? 'ViewColumns' : 'ViewColumn', 'Create')) {
New-HaloPOSTRequest -Object $ViewColumn -Endpoint 'viewcolumns'
}
} catch {
New-HaloError -ErrorRecord $_
}
}
25 changes: 25 additions & 0 deletions Public/New/New-HaloViewFilter.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Function New-HaloViewFilter {
<#
.SYNOPSIS
Creates one or more viewfilters via the Halo API.
.DESCRIPTION
Function to send an viewfilter creation request to the Halo API
.OUTPUTS
Outputs an object containing the response from the web request.
#>
[CmdletBinding( SupportsShouldProcess = $True )]
[OutputType([Object[]])]
Param (
# Object or array of objects containing properties and values used to create one or more new viewfilters.
[Parameter( Mandatory = $True )]
[Object[]]$ViewFilter
)
Invoke-HaloPreFlightCheck
try {
if ($PSCmdlet.ShouldProcess($ViewFilter -is [Array] ? 'ViewFilters' : 'ViewFilter', 'Create')) {
New-HaloPOSTRequest -Object $ViewFilter -Endpoint 'viewfilter'
}
} catch {
New-HaloError -ErrorRecord $_
}
}
25 changes: 25 additions & 0 deletions Public/New/New-HaloViewList.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Function New-HaloViewList {
<#
.SYNOPSIS
Creates one or more viewlists via the Halo API.
.DESCRIPTION
Function to send an viewlist creation request to the Halo API
.OUTPUTS
Outputs an object containing the response from the web request.
#>
[CmdletBinding( SupportsShouldProcess = $True )]
[OutputType([Object[]])]
Param (
# Object or array of objects containing properties and values used to create one or more new viewlists.
[Parameter( Mandatory = $True )]
[Object[]]$ViewList
)
Invoke-HaloPreFlightCheck
try {
if ($PSCmdlet.ShouldProcess($ViewList -is [Array] ? 'ViewLists' : 'ViewList', 'Create')) {
New-HaloPOSTRequest -Object $ViewList -Endpoint 'viewlists'
}
} catch {
New-HaloError -ErrorRecord $_
}
}
25 changes: 25 additions & 0 deletions Public/New/New-HaloViewListGroup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Function New-HaloViewListGroup {
<#
.SYNOPSIS
Creates one or more viewlistgroups via the Halo API.
.DESCRIPTION
Function to send an viewlistgroup creation request to the Halo API
.OUTPUTS
Outputs an object containing the response from the web request.
#>
[CmdletBinding( SupportsShouldProcess = $True )]
[OutputType([Object[]])]
Param (
# Object or array of objects containing properties and values used to create one or more new viewlistgroups.
[Parameter( Mandatory = $True )]
[Object[]]$ViewListGroup
)
Invoke-HaloPreFlightCheck
try {
if ($PSCmdlet.ShouldProcess($ViewListGroup -is [Array] ? 'ViewListGroups' : 'ViewListGroup', 'Create')) {
New-HaloPOSTRequest -Object $ViewListGroup -Endpoint 'viewlistgroup'
}
} catch {
New-HaloError -ErrorRecord $_
}
}

0 comments on commit bf3f7c9

Please sign in to comment.