Skip to content

Commit

Permalink
import: admin api powershell module (version 1.9.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
grammmike committed Dec 6, 2022
0 parents commit 4c18c3a
Show file tree
Hide file tree
Showing 755 changed files with 60,600 additions and 0 deletions.
74 changes: 74 additions & 0 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#
# grommunio Admin API
# grommunio administration REST API
# Version: 1.9.2
#

function Get-FunctionsToExport {
[CmdletBinding()]
Param (
[Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[ValidateNotNullOrEmpty()]
[Alias('FullName')]
$Path
)

Process {
$Token = $null
$ParserErr = $null

$Ast = [System.Management.Automation.Language.Parser]::ParseFile(
$Path,
[ref]$Token,
[ref]$ParserErr
)

if ($ParserErr) {
throw $ParserErr
} else {
foreach ($name in 'Begin', 'Process', 'End') {
foreach ($Statement in $Ast."${name}Block".Statements) {
if (
[String]::IsNullOrWhiteSpace($Statement.Name) -or
$Statement.Extent.ToString() -notmatch
('function\W+{0}' -f $Statement.Name)
) {
continue
}

$Statement.Name
}
}
}
}
}

$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
$FunctionPath = 'Api', 'Model', 'Client' | ForEach-Object {Join-Path "$ScriptDir\src\GrommunioAdmin\" $_}

$Manifest = @{
Path = "$ScriptDir\src\GrommunioAdmin\GrommunioAdmin.psd1"

CompanyName = 'grommunio'
Description = 'GrommunioAdmin - the PowerShell module for grommunio Admin API'
Tags = @('grommunio' )
ProjectUri = 'https://grommunio.com'
LicenseUri = 'https://www.gnu.org/licenses/agpl-3.0.txt'
IconUri = 'https://grommunio.com/wp-content/uploads/2021/12/grommunio_logo_bg_square_media.svg'

ModuleVersion = '1.9.2'

RootModule = 'GrommunioAdmin.psm1'
Guid = '{A1D9801D-61B0-4395-939B-99C64CB426E5}' # Has to be static, otherwise each new build will be considered different module

PowerShellVersion = '6.2'

FunctionsToExport = $FunctionPath | Get-ChildItem -Filter *.ps1 | Get-FunctionsToExport

VariablesToExport = @()
AliasesToExport = @()
CmdletsToExport = @()

}

New-ModuleManifest @Manifest
573 changes: 573 additions & 0 deletions README.md

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# grommunio Admin API
# grommunio administration REST API
# Version: 1.9.2
#

version: 1.0.{build}
image:
- Visual Studio 2019 # PWSH 7.x
#- Visual Studio 2017 # PS 5.x, PWSH 6.x
#- Ubuntu # PWSH 6.x
install:
- pwsh: $PSVersionTable.PSVersion
- pwsh: Install-Module Pester -Force -Scope CurrentUser
build: off
test_script:
- pwsh: |
.\Build.ps1
Import-Module -Name '.\src\GrommunioAdmin'
$Result = Invoke-Pester -PassThru
if ($Result.FailedCount -gt 0) {
$host.SetShouldExit($Result.FailedCount)
exit $Result.FailedCount
}
deploy_script:
- pwsh: |
if ($env:APPVEYOR_REPO_TAG -eq $true -and $null -ne $env:NuGetApiKey) {
.\Build.ps1
try {
Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\GrommunioAdmin\ -Confirm:$False -Verbose
Write-Host "Successfully published the PowerShell module."
} catch {
$host.SetShouldExit($LastExitCode)
Write-Host "Error when running Publish-Module:"
Write-Host $_
exit
}
}
25 changes: 25 additions & 0 deletions docs/AboutResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# AboutResponse
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**API** | **String** | Version of the API (according to the specification) | [optional]
**Backend** | **String** | Version of the implementation | [optional]
**Schema** | **Int32** | Database schema version | [optional]

## Examples

- Prepare the resource
```powershell
$AboutResponse = Initialize-GrommunioAdminAboutResponse -API null `
-Backend null `
-Schema null
```

- Convert the resource to JSON
```powershell
$AboutResponse | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20 changes: 20 additions & 0 deletions docs/Action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Action
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Examples

- Prepare the resource
```powershell
$Action = Initialize-GrommunioAdminAction
```

- Convert the resource to JSON
```powershell
$Action | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

23 changes: 23 additions & 0 deletions docs/AdminPermission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# AdminPermission
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ID** | **Int32** | | [optional]
**Permission** | **String** | | [optional]

## Examples

- Prepare the resource
```powershell
$AdminPermission = Initialize-GrommunioAdminAdminPermission -ID null `
-Permission null
```

- Convert the resource to JSON
```powershell
$AdminPermission | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

29 changes: 29 additions & 0 deletions docs/AdminRole.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# AdminRole
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ID** | **Int32** | Unique ID of the object | [optional] [readonly]
**Name** | **String** | | [optional]
**Description** | **String** | | [optional]
**Permissions** | [**AdminPermission[]**](AdminPermission.md) | List of permissions associated with the role | [optional]
**Users** | [**User1[]**](User1.md) | List of users associated with the role | [optional]

## Examples

- Prepare the resource
```powershell
$AdminRole = Initialize-GrommunioAdminAdminRole -ID null `
-Name null `
-Description null `
-Permissions null `
-Users null
```

- Convert the resource to JSON
```powershell
$AdminRole | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

27 changes: 27 additions & 0 deletions docs/AdminRoleWrite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# AdminRoleWrite
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **String** | | [optional]
**Description** | **String** | | [optional]
**Permissions** | [**AdminPermission[]**](AdminPermission.md) | | [optional]
**Users** | **Int32[]** | List of user IDs to associate with the role | [optional]

## Examples

- Prepare the resource
```powershell
$AdminRoleWrite = Initialize-GrommunioAdminAdminRoleWrite -Name null `
-Description null `
-Permissions null `
-Users null
```

- Convert the resource to JSON
```powershell
$AdminRoleWrite | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20 changes: 20 additions & 0 deletions docs/Allowbluetooth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Allowbluetooth
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Examples

- Prepare the resource
```powershell
$Allowbluetooth = Initialize-GrommunioAdminAllowbluetooth
```

- Convert the resource to JSON
```powershell
$Allowbluetooth | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20 changes: 20 additions & 0 deletions docs/Allowbrowser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Allowbrowser
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Examples

- Prepare the resource
```powershell
$Allowbrowser = Initialize-GrommunioAdminAllowbrowser
```

- Convert the resource to JSON
```powershell
$Allowbrowser | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20 changes: 20 additions & 0 deletions docs/Allowcam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Allowcam
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Examples

- Prepare the resource
```powershell
$Allowcam = Initialize-GrommunioAdminAllowcam
```

- Convert the resource to JSON
```powershell
$Allowcam | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20 changes: 20 additions & 0 deletions docs/Allowconsumeremail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Allowconsumeremail
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Examples

- Prepare the resource
```powershell
$Allowconsumeremail = Initialize-GrommunioAdminAllowconsumeremail
```

- Convert the resource to JSON
```powershell
$Allowconsumeremail | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20 changes: 20 additions & 0 deletions docs/Allowdesktopsync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Allowdesktopsync
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Examples

- Prepare the resource
```powershell
$Allowdesktopsync = Initialize-GrommunioAdminAllowdesktopsync
```

- Convert the resource to JSON
```powershell
$Allowdesktopsync | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20 changes: 20 additions & 0 deletions docs/Allowhtmlemail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Allowhtmlemail
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Examples

- Prepare the resource
```powershell
$Allowhtmlemail = Initialize-GrommunioAdminAllowhtmlemail
```

- Convert the resource to JSON
```powershell
$Allowhtmlemail | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20 changes: 20 additions & 0 deletions docs/Allowinternetsharing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Allowinternetsharing
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Examples

- Prepare the resource
```powershell
$Allowinternetsharing = Initialize-GrommunioAdminAllowinternetsharing
```

- Convert the resource to JSON
```powershell
$Allowinternetsharing | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Loading

0 comments on commit 4c18c3a

Please sign in to comment.