Skip to content

Commit

Permalink
Version 2.0.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
homotechsual committed Jan 15, 2024
1 parent d0a4e6b commit c8fa285
Show file tree
Hide file tree
Showing 140 changed files with 14,311 additions and 54 deletions.
15 changes: 12 additions & 3 deletions .build/CommandletShortNames.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ Connect-NinjaOne: NinjaOne
Find-NinjaOneDevices: Devices
Get-NinjaOneActivities: Activities
Get-NinjaOneAlerts: Alerts
Get-NinjaOneAntivirusStatus: Antivirus Status Query
Get-NinjaOneAntivirusThreats: Antivirus Threats Query
Get-NinjaOneAntiVirusStatus: AntiVirus Status Query
Get-NinjaOneAntiVirusThreats: AntiVirus Threats Query
Get-NinjaOneAttachment: Attachment
Get-NinjaOneBackupJobs: Backup Jobs
Get-NinjaOneBackupUsage: Backup Usage Query
Get-NinjaOneComputerSystems: Computer Systems Query
Get-NinjaOneContacts: Contacts
Expand All @@ -14,6 +15,7 @@ Get-NinjaOneDeviceDashboardURL: Device Dashboard URL
Get-NinjaOneDeviceDisks: Device Disks
Get-NinjaOneDeviceHealth: Device Health Query
Get-NinjaOneDeviceLastLoggedOnUser: Device Last Logged On User
Get-NinjaOneDeviceNetworkInterfaces: Device Network Interfaces
Get-NinjaOneDeviceOSPatches: Device OS Patches
Get-NinjaOneDeviceOSPatchInstalls: Device OS Patch Installs
Get-NinjaOneDevicePolicyOverrides: Device Policy Overrides
Expand All @@ -25,6 +27,7 @@ Get-NinjaOneDeviceSoftwarePatchInstalls: Device Software Patch Installs
Get-NinjaOneDeviceVolumes: Device Volumes
Get-NinjaOneDeviceWindowsServices: Device Windows Services
Get-NinjaOneDisks: Disks Query
Get-NinjaOneDocumentTemplates: Document Template
Get-NinjaOneGroupMembers: Group Members
Get-NinjaOneGroups: Groups
Get-NinjaOneInstaller: Installer
Expand All @@ -33,6 +36,7 @@ Get-NinjaOneLocationBackupUsage: Location Backup Usage
Get-NinjaOneLocationCustomFields: Location Custom Fields
Get-NinjaOneLocations: Locations
Get-NinjaOneLoggedOnUsers: Logged On Users Query
Get-NinjaOneNetworkInterfaces: Network Interfaces Query
Get-NinjaOneOperatingSystems: Operating Systems Query
Get-NinjaOneOrganisationCustomFields: Organisation Custom Fields
Get-NinjaOneOrganisationDocuments: Documents
Expand Down Expand Up @@ -63,13 +67,16 @@ Get-NinjaOneWindowsServices: Windows Services Query
Invoke-NinjaOneDeviceScript: Script or Action
Invoke-NinjaOneRequest: API Request
Invoke-NinjaOneWindowsServiceAction: Windows Service Action
New-NinjaOneDocumentTemplate: Document Template
New-NinjaOneInstaller: Installer
New-NinjaOneLocation: Location
New-NinjaOneOrganisation: Organisation
New-NinjaOneOrganisationDocument: Organisation Documents
New-NinjaOnePolicy: Policy
New-NinjaOneTicket: Ticket
New-NinjaOneTicketComment: Ticket Comment
Remove-NinjaOneDeviceMaintenance: Maintenance
Remove-NinjaOneDocumentTemplate: Document Template
Remove-NinjaOneWebhook: Webhook
Reset-NinjaOneAlert: Alert
Reset-NinjaOneDevicePolicyOverrides: Device Policy Overrides
Expand All @@ -78,12 +85,14 @@ Set-NinjaOneDevice: Device
Set-NinjaOneDeviceApproval: Device Approval
Set-NinjaOneDeviceCustomFields: Device Custom Fields
Set-NinjaOneDeviceMaintenance: Device Maintenance
Set-NinjaOneDocumentTemplate: Document Template
Set-NinjaOneLocation: Location
Set-NinjaOneLocationCustomFields: Location Custom Fields
Set-NinjaOneNodeRolePolicyAssignment: Node Role Policy Assignment
Set-NinjaOneOrganisation: Organisation
Set-NinjaOneOrganisationCustomFields: Organisation Custom Fields
Set-NinjaOneOrganisationDocument: Organisation Document
Set-NinjaOneOrganisationDocuments: Organisation Documents
Set-NinjaOneOrganisationPolicies: Organisation Policies
Set-NinjaOneTicket: Ticket
Set-NinjaOneWindowsServiceConfiguration: Windows Service Configuration
Update-NinjaOneWebhook: Webhook
16 changes: 16 additions & 0 deletions Source/Classes/Object/01-NinjaOneCustomField.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using namespace System.Management.Automation
class NinjaOneCustomField {
[String]$name
[Object]$value
[Bool]$isHTML

NinjaOneCustomField([String]$name, [Object]$value) {
$this.name = $name
$this.value = $value
}

NinjaOneCustomField([String]$name, [Object]$value, [Bool]$isHTML) {
$this.name = $name
$this.value = @{ html = $value }
}
}
61 changes: 61 additions & 0 deletions Source/Classes/Object/05-NinjaOneDocumentTemplateField.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using namespace System.Management.Automation
class NinjaOneDocumentTemplateField {
# The human readable label for the field.
[String]$fieldLabel
# The machine readable name for the field. This is an immutable value.
[String]$fieldName
# The description of the field.
[String]$fieldDescription
# The type of the field.
[ValidateSet('DROPDOWN', 'MULTI_SELECT', 'CHECKBOX', 'TEXT', 'TEXT_MULTILINE', 'TEXT_ENCRYPTED', 'NUMERIC', 'DECIMAL', 'DATE', 'DATE_TIME', 'TIME', 'ATTACHMENT', 'NODE_DROPDOWN', 'NODE_MULTI_SELECT', 'CLIENT_DROPDOWN', 'CLIENT_MULTI_SELECT', 'CLIENT_LOCATION_DROPDOWN', 'CLIENT_LOCATION_MULTI_SELECT', 'CLIENT_DOCUMENT_DROPDOWN', 'CLIENT_DOCUMENT_MULTI_SELECT', 'EMAIL', 'PHONE', 'IP_ADDRESS', 'WYSIWYG', 'URL')]
[String]$fieldType
# The technician permissions for the field.
[ValidateSet('NONE', 'EDITABLE', 'READ_ONLY')]
[String]$fieldTechnicianPermission
# The script permissions for the field.
[ValidateSet('NONE', 'READ_ONLY', 'WRITE_ONLY', 'READ_WRITE')]
[String]$fieldScriptPermission
# The API permissions for the field.
[ValidateSet('NONE', 'READ_ONLY', 'WRITE_ONLY', 'READ_WRITE')]
[String]$fieldAPIPermission
# The default value for the field.
[String]$fieldDefaultValue
# The field content for the field (a.k.a the field options).
[Object[]]$fieldContent
# When creating a UI element (e.g a title, separator or description box) this is the machine readable name of the UI element.
[String]$uiElementName
# When creating a UI element (e.g a title, separator or description box) this is the value of the UI element.
[String]$uiElementValue
# When creating a UI element (e.g a title, separator or description box) this is the type of the UI element.
[ValidateSet('TITLE', 'SEPARATOR', 'DESCRIPTION')]
[String]$uiElementType

# Full object constructor.
NinjaOneDocumentTemplateField(
[String]$fieldLabel,
[String]$fieldName,
[String]$fieldDescription,
[String]$fieldType,
[String]$fieldTechnicianPermission,
[String]$fieldScriptPermission,
[String]$fieldAPIPermission,
[String]$fieldDefaultValue,
[Object[]]$fieldContent,
[String]$uiElementName,
[String]$uiElementValue,
[String]$uiElementType
) {
$this.fieldLabel = $fieldLabel
$this.fieldName = $fieldName
$this.fieldDescription = $fieldDescription
$this.fieldType = $fieldType
$this.fieldTechnicianPermission = $fieldTechnicianPermission
$this.fieldScriptPermission = $fieldScriptPermission
$this.fieldAPIPermission = $fieldAPIPermission
$this.fieldDefaultValue = $fieldDefaultValue
$this.fieldContent = $fieldContent
$this.uiElementName = $uiElementName
$this.uiElementValue = $uiElementValue
$this.uiElementType = $uiElementType
}
}
74 changes: 74 additions & 0 deletions Source/Classes/Object/05-NinjaOneOrganisationDocument.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
using namespace System.Management.Automation
class NinjaOneOrganisationDocument {
[Int]$documentId
[String]$documentName
[String]$documentDescription
[NinjaOneCustomField[]]$fields
[Int]$documentTemplateId
[Int]$organisationId
# New object contructors.
## Full object constructor.
NinjaOneOrganisationDocument(
[String]$documentName,
[String]$documentDescription,
[NinjaOneCustomField[]]$fields,
[Int]$documentTemplateId,
[Int]$organisationId
) {
$this.documentName = $documentName
$this.documentDescription = $documentDescription
$this.fields = $fields
$this.documentTemplateId = $documentTemplateId
$this.organisationId = $organisationId
}
## No template id constructor.
NinjaOneOrganisationDocument(
[String]$documentName,
[String]$documentDescription,
[NinjaOneCustomField[]]$fields,
[Int]$organisationId
) {
$this.documentName = $documentName
$this.documentDescription = $documentDescription
$this.fields = $fields
$this.organisationId = $organisationId
}
## No description constructor.
NinjaOneOrganisationDocument(
[String]$documentName,
[NinjaOneCustomField[]]$fields,
[Int]$documentTemplateId,
[Int]$organisationId
) {
$this.documentName = $documentName
$this.fields = $fields
$this.documentTemplateId = $documentTemplateId
$this.organisationId = $organisationId
}
## No template id or description constructor.
NinjaOneOrganisationDocument(
[String]$documentName,
[NinjaOneCustomField[]]$fields,
[Int]$organisationId
) {
$this.documentName = $documentName
$this.fields = $fields
$this.organisationId = $organisationId
}
# Update object contructors.
## Full object constructor.
NinjaOneOrganisationDocument(
[Int]$documentId,
[String]$documentName,
[String]$documentDescription,
[NinjaOneCustomField[]]$fields,
[Int]$organisationId
) {
$this.documentId = $documentId
$this.documentName = $documentName
$this.documentDescription = $documentDescription
$this.fields = $fields
$this.organisationId = $organisationId
}
##
}
11 changes: 10 additions & 1 deletion Source/NinjaOne.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
'Get-NinjaOneAntivirusStatus',
'Get-NinjaOneAntivirusThreats',
'Get-NinjaOneAttachment',
'Get-NinjaOneBackupJobs',
'Get-NinjaOneBackupUsage',
'Get-NinjaOneComputerSystems',
'Get-NinjaOneContacts',
Expand All @@ -88,6 +89,7 @@
'Get-NinjaOneDeviceHealth',
'Get-NinjaOneDeviceJobs',
'Get-NinjaOneDeviceLastLoggedOnUser',
'Get-NinjaOneDeviceNetworkInterfaces',
'Get-NinjaOneDeviceOSPatches',
'Get-NinjaOneDeviceOSPatchInstalls',
'Get-NinjaOneDevicePolicyOverrides',
Expand All @@ -99,6 +101,7 @@
'Get-NinjaOneDeviceVolumes',
'Get-NinjaOneDeviceWindowsServices',
'Get-NinjaOneDisks',
'Get-NinjaOneDocumentTemplates',
'Get-NinjaOneGroupMembers',
'Get-NinjaOneGroups',
'Get-NinjaOneInstaller',
Expand All @@ -107,6 +110,7 @@
'Get-NinjaOneLocationCustomFields',
'Get-NinjaOneLocations',
'Get-NinjaOneLoggedOnUsers',
'Get-NinjaOneNetworkInterfaces',
'Get-NinjaOneOperatingSystems',
'Get-NinjaOneOrganisationCustomFields',
'Get-NinjaOneOrganisationDocuments',
Expand Down Expand Up @@ -137,13 +141,16 @@
'Invoke-NinjaOneDeviceScript',
'Invoke-NinjaOneRequest',
'Invoke-NinjaOneWindowsServiceAction',
'New-NinjaOneDocumentTemplate',
'New-NinjaOneInstaller',
'New-NinjaOneLocation',
'New-NinjaOneOrganisation',
'New-NinjaOneOrganisationDocument',
'New-NinjaOnePolicy',
'New-NinjaOneTicket',
'New-NinjaOneTicketComment',
'Remove-NinjaOneDeviceMaintenance',
'Remove-NinjaOneDocumentTemplate',
'Remove-NinjaOneWebhook',
'Reset-NinjaOneAlert',
'Reset-NinjaOneDevicePolicyOverrides',
Expand All @@ -152,11 +159,13 @@
'Set-NinjaOneDeviceApproval',
'Set-NinjaOneDeviceCustomFields',
'Set-NinjaOneDeviceMaintenance',
'Set-NinjaOneDocumentTemplate',
'Set-NinjaOneLocation',
'Set-NinjaOneLocationCustomFields',
'Set-NinjaOneOrganisation',
'Set-NinjaOneOrganisationCustomFields',
'Set-NinjaOneOrganisationDocument',
'Set-NinjaOneOrganisationDocuments',
'Set-NinjaOneOrganisationPolicies',
'Set-NinjaOneTicket',
'Set-NinjaOneWindowsServiceConfiguration',
Expand Down Expand Up @@ -211,7 +220,7 @@
ReleaseNotes = 'Fix userType parameter on Get-NOUser.'

# Prerelease string of this module
Prerelease = 'Beta7'
Prerelease = 'RC1'

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
Expand Down
Loading

0 comments on commit c8fa285

Please sign in to comment.