Commands/Lexicons/com/atproto/server/Revoke-AtProtoServerAppPassword.ps1
function Revoke-AtProtoServerAppPassword { <# .Synopsis com.atproto.server.revokeAppPassword .Description com.atproto.server.revokeAppPassword .Link https://github.com/bluesky-social/atproto/tree/main/lexicons/com/atproto/server/revokeAppPassword.json #> [Alias('Revoke-AtProtocolServerAppPassword','atproto.server.revokeAppPassword','com.atproto.server.revokeAppPassword')] [CmdletBinding(SupportsShouldProcess)] param( [Parameter(ValueFromPipelineByPropertyName)] [ComponentModel.DefaultBindingProperty('name')] [String] $Name ) begin { $NamespaceID = 'com.atproto.server.revokeAppPassword' $httpMethod = 'POST' $InvokeAtSplat = [Ordered]@{Method=$httpMethod} $InvokeAtSplat["PSTypeName"] = $NamespaceID $parameterAliases = [Ordered]@{} $AsByte = $false :nextParameter foreach ($paramMetadata in ([Management.Automation.CommandMetadata]$MyInvocation.MyCommand).Parameters.Values) { foreach ($attr in $paramMetadata.Attributes) { if ($attr -is [ComponentModel.DefaultBindingPropertyAttribute]) { $parameterAliases[$paramMetadata.Name] = $attr.Name continue nextParameter } } } $parameterQueue = [Collections.Queue]::new() } process { $parameterQueue.Enqueue([Ordered]@{} + $PSBoundParameters) } end { $parameterQueue.ToArray() | Invoke-AtProtocol -Method $httpMethod -NamespaceID $NamespaceID -Parameter { $_ } -ParameterAlias $parameterAliases @InvokeAtSplat -ContentType $( if ($ContentType) { $ContentType } else { "application/json" } ) -AsByte:$AsByte -Property { $_ } -Cache:$( if ($cache) {$cache} else { $false } ) } } |