-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0a4e6b
commit c8fa285
Showing
140 changed files
with
14,311 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
61
Source/Classes/Object/05-NinjaOneDocumentTemplateField.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
## | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.