Skip to content

Commit

Permalink
TssSecretSummary - migrate and udpate --> Thycotic.PowerShell.Secrets…
Browse files Browse the repository at this point in the history
….Summary
  • Loading branch information
wsmelton committed Jul 20, 2021
1 parent 7d7eed0 commit cb5eebd
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 102 deletions.
2 changes: 1 addition & 1 deletion docs/commands/secrets/Close-TssSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### TssSecretSummary
### Thycotic.PowerShell.Secrets.Summary
## NOTES
Requires TssSession object returned by New-TssSession
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/secrets/Get-TssSecretSummary.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### TssSecretSummary
### Thycotic.PowerShell.Secrets.Summary
## NOTES
Requires TssSession object returned by New-TssSession
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/secrets/Search-TssSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### TssSecretSummary
### Thycotic.PowerShell.Secrets.Summary
## NOTES
Requires TssSession object returned by New-TssSession
Expand Down
36 changes: 36 additions & 0 deletions src/Thycotic.SecretServer/classes/secrets/Summary.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Threading.Tasks;
using System.Management.Automation;
using System.Management.Automation.Runspaces;

namespace Thycotic.PowerShell.Secrets
{
public class Summary
{
public bool Active { get; set; }
public bool AutoChangeEnabled { get; set; }
public bool CheckedOut { get; set; }
public bool CheckOutEnabled { get; set; }
public DateTime? CreateDate { get; set; }
public int DaysUntilExpiration { get; set; }
public bool DoubleLockEnabled { get; set; }
public SummaryExtendedField[] ExtendedFields { get; set; }
public int FolderId { get; set; }
public bool HidePassword { get; set; }
public int Id { get; set; }
public bool InheritsPermissions { get; set; }
public bool IsOutOfSync { get; set; }
public string OutOfSyncReason { get; set; }
public bool IsRestricted { get; set; }
public DateTime? LastAccessed { get; set; }
public string LastHeartbeatStatus { get; set; }
public DateTime? LastPasswordChangeAttempt { get; set; }
public string Name { get; set; }
public bool RequiresApproval { get; set; }
public bool RequiresComment { get; set; }
public int SecretTemplateId { get; set; }
public string SecretTemplateName { get; set; }
public int SiteId { get; set; }
public string[] ResponseCodes { get; set; }
}
}
78 changes: 0 additions & 78 deletions src/classes/secrets/TssSecretSummary.class.ps1

This file was deleted.

10 changes: 5 additions & 5 deletions src/en-us/about_tsssecretsummary.help.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
TOPIC
This help topic describes the TssSecretSummary class in the Thycotic.SecretServer module
This help topic describes the Thycotic.PowerShell.Secrets.Summary class in the Thycotic.SecretServer module

CLASS
TssSecretSummary
Thycotic.PowerShell.Secrets.Summary

INHERITANCE
None

DESCRIPTION
The TssSecretSummary class represents the SecretSummary object returned by Secret Server endpoint GET /secrets and GET /secrets/{id}/summary
The Thycotic.PowerShell.Secrets.Summary class represents the SecretSummary object returned by Secret Server endpoint GET /secrets and GET /secrets/{id}/summary

CONSTRUCTORS
new()
Expand All @@ -35,7 +35,7 @@ PROPERTIES
DoubleLockEnabled
Indicates whether or not DoubleLock is enabled for this password

ExtendedFields [TssSecretSummaryExtendedField[]]
ExtendedFields [Thycotic.PowerShell.Secrets.SummaryExtendedField[]]
Any requested extended fields from a lookup request

FolderId
Expand Down Expand Up @@ -89,6 +89,6 @@ PROPERTIES
METHODS

RELATED LINKS:
TssSecretSummaryExtendedField
Thycotic.PowerShell.Secrets.SummaryExtendedField
Search-TssSecret
Get-TssSecretSummary
8 changes: 4 additions & 4 deletions src/en-us/about_tsssecretsummaryextendedfield.help.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
TOPIC
This help topic describes the TssSecretSummaryExtendedField class in the Thycotic.SecretServer module
This help topic describes the Thycotic.PowerShell.Secrets.SummaryExtendedField class in the Thycotic.SecretServer module

CLASS
TssSecretSummaryExtendedField
Thycotic.PowerShell.Secrets.SummaryExtendedField

INHERITANCE
None

DESCRIPTION
The TssSecretSummaryExtendedField class represents the ISecretSummaryExtendedField object returned by Secret Server endpoint GET /secrets and GET /secrets/{id}/summary
The Thycotic.PowerShell.Secrets.SummaryExtendedField class represents the ISecretSummaryExtendedField object returned by Secret Server endpoint GET /secrets and GET /secrets/{id}/summary

CONSTRUCTORS
new()
Expand All @@ -23,6 +23,6 @@ PROPERTIES
METHODS

RELATED LINKS:
TssSecretSummary
Thycotic.PowerShell.Secrets.Summary
Search-TssSecret
Get-TssSecretSummary
2 changes: 1 addition & 1 deletion src/functions/secrets/Close-Secret.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Close-Secret {
.NOTES
Requires TssSession object returned by New-TssSession
#>
[OutputType('TssSecretSummary')]
[OutputType('Thycotic.PowerShell.Secrets.Summary')]
[cmdletbinding()]
param(
# TssSession object created by New-TssSession for authentication
Expand Down
4 changes: 2 additions & 2 deletions src/functions/secrets/Get-SecretSummary.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Get-SecretSummary {
Requires TssSession object returned by New-TssSession
#>
[CmdletBinding()]
[OutputType('TssSecretSummary')]
[OutputType('Thycotic.PowerShell.Secrets.Summary')]
param (
# TssSession object created by New-TssSession for authentication
[Parameter(Mandatory, ValueFromPipeline, Position = 0)]
Expand Down Expand Up @@ -60,7 +60,7 @@ function Get-SecretSummary {
}

if ($restResponse) {
[TssSecretSummary]$restResponse
[Thycotic.PowerShell.Secrets.Summary]$restResponse
}
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/functions/secrets/Search-Secret.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Search-Secret {
Requires TssSession object returned by New-TssSession
#>
[cmdletbinding(DefaultParameterSetName = 'filter')]
[OutputType('TssSecretSummary')]
[OutputType('Thycotic.PowerShell.Secrets.Summary')]
param(
# TssSession object created by New-TssSession for authentication
[Parameter(Mandatory, ValueFromPipeline, Position = 0)]
Expand Down Expand Up @@ -285,7 +285,7 @@ function Search-Secret {
}

if ($restResponse.records) {
[TssSecretSummary[]]$restResponse.records
[Thycotic.PowerShell.Secrets.Summary[]]$restResponse.records
}
} else {
Write-Warning 'No valid session found'
Expand Down
2 changes: 1 addition & 1 deletion src/parts/SearchSecrets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ process {
}

if ($restResponse.records) {
[TssSecretSummary[]]$restResponse.records
[Thycotic.PowerShell.Secrets.Summary[]]$restResponse.records
}
}
4 changes: 2 additions & 2 deletions tests/secrets/Close-Secret.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Describe "$commandName verify parameters" {
}
}
Context "Command specific details" {
It "$commandName should set OutputType to TssSecretSummary" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'TssSecretSummary'
It "$commandName should set OutputType to Thycotic.PowerShell.Secrets.Summary" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'Thycotic.PowerShell.Secrets.Summary'
}
}
}
4 changes: 2 additions & 2 deletions tests/secrets/Get-SecretSummary.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Describe "$commandName verify parameters" {
}
}
Context "Command specific details" {
It "$commandName should set OutputType to TssSecretSummary" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'TssSecretSummary'
It "$commandName should set OutputType to Thycotic.PowerShell.Secrets.Summary" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'Thycotic.PowerShell.Secrets.Summary'
}
}
}
4 changes: 2 additions & 2 deletions tests/secrets/Search-Secret.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Describe "$commandName verify parameters" {
}
}
Context "Command specific details" {
It "$commandName should set OutputType to TssSecretSummary" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'TssSecretSummary'
It "$commandName should set OutputType to Thycotic.PowerShell.Secrets.Summary" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'Thycotic.PowerShell.Secrets.Summary'
}
}
}

0 comments on commit cb5eebd

Please sign in to comment.