From 6f82b6f6622d4af8589fbecea176dccd694272be Mon Sep 17 00:00:00 2001 From: Kamil Pro Date: Sun, 20 Nov 2022 20:01:53 +0000 Subject: [PATCH] Update version --- src/KpPwpush.psd1 | Bin 7756 -> 7862 bytes src/public/Connect-Pwpush.ps1 | 14 ++++++++++++++ src/public/Get-Pwpush.ps1 | 13 +++++++++++++ src/public/Get-PwpushPreview.ps1 | 13 +++++++++++++ src/public/Invoke-PwpushRequest.ps1 | 8 +++++++- src/public/New-Pwpush.ps1 | 13 +++++++++++++ src/public/Remove-Pwpush.ps1 | 13 +++++++++++++ 7 files changed, 73 insertions(+), 1 deletion(-) diff --git a/src/KpPwpush.psd1 b/src/KpPwpush.psd1 index 1ed2a631f769e46c932ac6ccb5fe5920ad0d2905..c12a8ff2772b790d94ad19a8a33273cb2b4932ba 100644 GIT binary patch delta 136 zcmX?Ov(0vc8{=jtMg<8)9R>vkC58fqM21R+9EN-#odV=TL=%DHnVaJ!XEIG*CoSb| z3skDk;0RQZ0%Rov73TtBDnlMa36P%z)LIPWf#foPbPiCn0#GI&NTxBA0#zjgd6__d M9z*eFX&FN%0ID<_i~s-t delta 48 zcmV-00MGxnJ + + [cmdletbinding()] param( [string]$Server = "https://pwpush.com/" diff --git a/src/public/Get-Pwpush.ps1 b/src/public/Get-Pwpush.ps1 index e4c240b..b59e412 100644 --- a/src/public/Get-Pwpush.ps1 +++ b/src/public/Get-Pwpush.ps1 @@ -1,5 +1,18 @@ function Get-Pwpush { + <# + .SYNOPSIS + Retrieves a push. + .DESCRIPTION + Retrieves a push including it’s payload and details. If the push is still active, this will burn a view and the transaction will be logged in the push audit log. + .PARAMETER UrlToken + Token of the push + .LINK + https://pwpush.com/api/1.0/passwords/show.en.html + .EXAMPLE + Get-KpPwpush -UrlToken abc123 + Retrieves push with token abc123 + #> [cmdletbinding()] param ( [Parameter(Mandatory)] diff --git a/src/public/Get-PwpushPreview.ps1 b/src/public/Get-PwpushPreview.ps1 index 848fbff..fe1b725 100644 --- a/src/public/Get-PwpushPreview.ps1 +++ b/src/public/Get-PwpushPreview.ps1 @@ -1,5 +1,18 @@ function Get-PwpushPreview { + <# + .SYNOPSIS + Retrieves the URL of a push. + .DESCRIPTION + Helper endpoint to retrieve the fully qualified secret URL of a push. + .PARAMETER UrlToken + Token of a secret + .LINK + https://pwpush.com/api/1.0/passwords/preview.en.html + .EXAMPLE + Get-KpPwpushPreview -UrlToken 123abc + Retrieves URL for token 123abc + #> [cmdletbinding()] param ( [Parameter(Mandatory)] diff --git a/src/public/Invoke-PwpushRequest.ps1 b/src/public/Invoke-PwpushRequest.ps1 index c611210..7caccb7 100644 --- a/src/public/Invoke-PwpushRequest.ps1 +++ b/src/public/Invoke-PwpushRequest.ps1 @@ -1,5 +1,11 @@ function Invoke-PwpushRequest { + <# + .SYNOPSIS + Main function for interacting with pwpush API + .DESCRIPTION + This function takes care of all headers, pagination, body formatting etc. for pwpush api calls. + #> [cmdletbinding()] param( [Parameter(Mandatory)] @@ -15,7 +21,7 @@ function Invoke-PwpushRequest if ( -not ($Script:Connection)) { - Throw "Please connect to Pwpush via Connect-Pwpush" + Throw "Please connect to Pwpush via Connect-KpPwpush" } $url = "$($Script:Connection.Server)/$Endpoint" diff --git a/src/public/New-Pwpush.ps1 b/src/public/New-Pwpush.ps1 index b45d2d8..dfb52ba 100644 --- a/src/public/New-Pwpush.ps1 +++ b/src/public/New-Pwpush.ps1 @@ -1,5 +1,18 @@ function New-Pwpush { + <# + .SYNOPSIS + Create a new push. + .DESCRIPTION + Create a new push. + .LINK + https://pwpush.com/api/1.0/passwords/create.en.html + .EXAMPLE + New-KpPwpush -Payload mySecret + Creates a new push with payload of mySecret + #> + + [cmdletbinding()] param ( [Parameter(Mandatory)] diff --git a/src/public/Remove-Pwpush.ps1 b/src/public/Remove-Pwpush.ps1 index e2f9de6..c106b1e 100644 --- a/src/public/Remove-Pwpush.ps1 +++ b/src/public/Remove-Pwpush.ps1 @@ -1,5 +1,18 @@ function Remove-Pwpush { + <# + .SYNOPSIS + Expires a push + .DESCRIPTION + Expires a push immediately. Must be authenticated & owner of the push or the push must have been created with deleteable_by_viewer. + .LINK + https://pwpush.com/api/1.0/passwords/destroy.en.html + .PARAMETER UrlToken + Token of a push + .EXAMPLE + Remove-KpPwPush -UrlToken abc123 + Expires token abc123 + #> [cmdletbinding()] param ( [Parameter(Mandatory)]