mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 22:54:05 -08:00
65820b3b54
* ✨ Create Freshservice node * 👕 Fix lintings * ⚡ Adjust from agent to department * ⚡ Adjust from location to ticket * 👕 Fix lintings * ✏️ Improve descriptions * 🔥 Remove logging * 🔥 Remove unused helper * ✏️ Fix helper documentation * ⚡ Simplify roles in agent:create * 🔥 Remove logging * ⚡ Minor improvements * ✏️ Adjust dynamic lists descriptions * ⚡ Set default values for problem:create * ⚡ Set default values for change:create * ⚡ Handle deletion with empty response * ⚡ Update getCredentials call to new style * ✏️ Reword multiOptions descriptions * ⚡ Add special handling for validation errors * 🔥 Remove concatenated name from filters * ⚡ Fix additional params in announcement:create * ✏️ Clarify asset display ID vs asset ID * ⚡ Fix asset:update arg typo * ⚡ Fix predefined filters in change:getAll * ⚡ Fix software status options * ✏️ Reword created_at in ticket:getAll * ⚡ Add status to ticket:update * 👕 Fix lint * ⚡ Improvements * ⚡ Minor improvements Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
348 lines
5.7 KiB
TypeScript
348 lines
5.7 KiB
TypeScript
import {
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export const softwareOperations = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Create',
|
|
value: 'create',
|
|
description: 'Create a software application',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
description: 'Delete a software application',
|
|
},
|
|
{
|
|
name: 'Get',
|
|
value: 'get',
|
|
description: 'Retrieve a software application',
|
|
},
|
|
{
|
|
name: 'Get All',
|
|
value: 'getAll',
|
|
description: 'Retrieve all software applications',
|
|
},
|
|
{
|
|
name: 'Update',
|
|
value: 'update',
|
|
description: 'Update a software application',
|
|
},
|
|
],
|
|
default: 'create',
|
|
},
|
|
] as INodeProperties[];
|
|
|
|
export const softwareFields = [
|
|
// ----------------------------------------
|
|
// software: create
|
|
// ----------------------------------------
|
|
{
|
|
displayName: 'Application Type',
|
|
name: 'applicationType',
|
|
type: 'options',
|
|
required: true,
|
|
options: [
|
|
{
|
|
name: 'Desktop',
|
|
value: 'desktop',
|
|
},
|
|
{
|
|
name: 'Mobile',
|
|
value: 'mobile',
|
|
},
|
|
{
|
|
name: 'SaaS',
|
|
value: 'saas',
|
|
},
|
|
],
|
|
default: 'desktop',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Name',
|
|
name: 'name',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Additional Fields',
|
|
name: 'additionalFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
default: {},
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
displayName: 'Description',
|
|
name: 'description',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Notes',
|
|
name: 'notes',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Status',
|
|
name: 'status',
|
|
type: 'options',
|
|
default: 'managed',
|
|
options: [
|
|
{
|
|
name: 'Disabled',
|
|
value: 'disabled',
|
|
},
|
|
{
|
|
name: 'Ignored',
|
|
value: 'ignored',
|
|
},
|
|
{
|
|
name: 'Needs Review',
|
|
value: 'needs review',
|
|
},
|
|
{
|
|
name: 'Restricted',
|
|
value: 'restricted',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
|
|
// ----------------------------------------
|
|
// software: delete
|
|
// ----------------------------------------
|
|
{
|
|
displayName: 'Software ID',
|
|
name: 'softwareId',
|
|
description: 'ID of the software application to delete',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'delete',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
|
|
// ----------------------------------------
|
|
// software: get
|
|
// ----------------------------------------
|
|
{
|
|
displayName: 'Software ID',
|
|
name: 'softwareId',
|
|
description: 'ID of the software application to retrieve',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'get',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
|
|
// ----------------------------------------
|
|
// software: getAll
|
|
// ----------------------------------------
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
default: false,
|
|
description: 'Whether to return all results or only up to a given limit',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
default: 50,
|
|
description: 'How many results to return',
|
|
typeOptions: {
|
|
minValue: 1,
|
|
},
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
returnAll: [
|
|
false,
|
|
],
|
|
},
|
|
},
|
|
},
|
|
|
|
// ----------------------------------------
|
|
// software: update
|
|
// ----------------------------------------
|
|
{
|
|
displayName: 'Software ID',
|
|
name: 'softwareId',
|
|
description: 'ID of the software application to update',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'update',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Update Fields',
|
|
name: 'updateFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
default: {},
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'software',
|
|
],
|
|
operation: [
|
|
'update',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
displayName: 'Application Type',
|
|
name: 'application_type',
|
|
type: 'options',
|
|
default: 'desktop',
|
|
description: 'Type of the software',
|
|
options: [
|
|
{
|
|
name: 'Desktop',
|
|
value: 'desktop',
|
|
},
|
|
{
|
|
name: 'Mobile',
|
|
value: 'mobile',
|
|
},
|
|
{
|
|
name: 'SaaS',
|
|
value: 'saas',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
displayName: 'Description',
|
|
name: 'description',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Name',
|
|
name: 'name',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Notes',
|
|
name: 'notes',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Status',
|
|
name: 'status',
|
|
type: 'options',
|
|
default: 'managed',
|
|
options: [
|
|
{
|
|
name: 'Disabled',
|
|
value: 'disabled',
|
|
},
|
|
{
|
|
name: 'Ignored',
|
|
value: 'ignored',
|
|
},
|
|
{
|
|
name: 'Needs Review',
|
|
value: 'needs review',
|
|
},
|
|
{
|
|
name: 'Restricted',
|
|
value: 'restricted',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
] as INodeProperties[];
|