refactor: Format nodes-base package (A-F) (#3800)

* 🔨 prettier formated nodes - A

* 🔨 prettier formated nodes - B

*  prettier formated nodes - C

*  prettier formated nodes - D

*  prettier formated nodes - E-F

* 🎨 Adjust nodes-base formatting command (#3805)

* Format additional files in nodes A-F (#3811)

*  fixes

* 🎨 Add Mindee to ignored dirs

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
Michael Kret
2022-08-01 23:47:55 +03:00
committed by GitHub
parent 2c17e6f3ca
commit 0ecbb4a19d
411 changed files with 12906 additions and 20148 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,6 @@
import {
IExecuteFunctions,
IHookFunctions,
} from 'n8n-core';
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
import {
IDataObject,
ILoadOptionsFunctions,
NodeApiError,
NodeOperationError,
} from 'n8n-workflow';
import { IDataObject, ILoadOptionsFunctions, NodeApiError, NodeOperationError } from 'n8n-workflow';
import {
AddressFixedCollection,
@@ -17,13 +9,9 @@ import {
RolesParameter,
} from './types';
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
import {
omit,
} from 'lodash';
import { omit } from 'lodash';
export async function freshserviceApiRequest(
this: IExecuteFunctions | IHookFunctions | ILoadOptionsFunctions,
@@ -32,7 +20,9 @@ export async function freshserviceApiRequest(
body: IDataObject = {},
qs: IDataObject = {},
) {
const { apiKey, domain } = await this.getCredentials('freshserviceApi') as FreshserviceCredentials;
const { apiKey, domain } = (await this.getCredentials(
'freshserviceApi',
)) as FreshserviceCredentials;
const encodedApiKey = Buffer.from(`${apiKey}:X`).toString('base64');
const options: OptionsWithUri = {
@@ -58,7 +48,6 @@ export async function freshserviceApiRequest(
return await this.helpers.request!(options);
} catch (error) {
if (error.error.description === 'Validation failed') {
const numberOfErrors = error.error.errors.length;
const message = 'Please check your parameters';
@@ -68,11 +57,10 @@ export async function freshserviceApiRequest(
message,
description: `For ${validationError.field}: ${validationError.message}`,
});
} else if (numberOfErrors > 1) {
throw new NodeApiError(this.getNode(), error, {
message,
description: 'For more information, expand \'details\' below and look at \'cause\' section',
description: "For more information, expand 'details' below and look at 'cause' section",
});
}
}
@@ -99,9 +87,7 @@ export async function freshserviceApiRequestAllItems(
if (!items.length) return returnData;
returnData.push(...items);
qs.page++;
} while (
items.length >= 30
);
} while (items.length >= 30);
return returnData;
}
@@ -145,23 +131,14 @@ export const toUserOptions = (loadedUsers: LoadedUser[]) => {
/**
* Ensure at least one role has been specified.
*/
export function validateAssignmentScopeGroup(
this: IExecuteFunctions,
roles: RolesParameter,
) {
export function validateAssignmentScopeGroup(this: IExecuteFunctions, roles: RolesParameter) {
if (!roles.roleProperties?.length) {
throw new NodeOperationError(
this.getNode(),
'Please specify a role for the agent to create.',
);
throw new NodeOperationError(this.getNode(), 'Please specify a role for the agent to create.');
}
}
export function sanitizeAssignmentScopeGroup(
this: IExecuteFunctions,
roles: RolesParameter,
) {
roles.roleProperties.forEach(roleProperty => {
export function sanitizeAssignmentScopeGroup(this: IExecuteFunctions, roles: RolesParameter) {
roles.roleProperties.forEach((roleProperty) => {
if (roleProperty.assignment_scope === 'specified_groups' && !roleProperty?.groups?.length) {
throw new NodeOperationError(
this.getNode(),
@@ -192,19 +169,21 @@ export function adjustAgentRoles(roles: RolesParameter) {
}
export function formatFilters(filters: IDataObject) {
const query = Object.keys(filters).map(key => {
const value = filters[key];
const query = Object.keys(filters)
.map((key) => {
const value = filters[key];
if (!isNaN(Number(value))) {
return `${key}:${filters[key]}`; // number
}
if (!isNaN(Number(value))) {
return `${key}:${filters[key]}`; // number
}
if (typeof value === 'string' && value.endsWith('Z')) {
return `${key}:'${value.split('T')[0]}'`; // date
}
if (typeof value === 'string' && value.endsWith('Z')) {
return `${key}:'${value.split('T')[0]}'`; // date
}
return `${key}:'${filters[key]}'`; // string
}).join(' AND ');
return `${key}:'${filters[key]}'`; // string
})
.join(' AND ');
return {
query: `"${query}"`,
@@ -226,12 +205,14 @@ export function validateUpdateFields(
throw new NodeOperationError(
this.getNode(),
`Please enter at least one field to update for the ${twoWordResources[resource] ?? resource}.`,
`Please enter at least one field to update for the ${
twoWordResources[resource] ?? resource
}.`,
);
}
}
export const toArray = (str: string) => str.split(',').map(e => e.trim());
export const toArray = (str: string) => str.split(',').map((e) => e.trim());
export function adjustAddress(fixedCollection: IDataObject & AddressFixedCollection) {
if (!fixedCollection.address) return fixedCollection;

View File

@@ -40,5 +40,5 @@ const RAW_LANGUAGES: { [key: string]: string } = {
};
export const LANGUAGES = Object.keys(RAW_LANGUAGES).map((key) => {
return ({ value: key, name: RAW_LANGUAGES[key] });
return { value: key, name: RAW_LANGUAGES[key] };
});

View File

@@ -1,10 +1,6 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
import {
LANGUAGES,
} from '../constants';
import { LANGUAGES } from '../constants';
export const agentOperations: INodeProperties[] = [
{
@@ -14,9 +10,7 @@ export const agentOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'agent',
],
resource: ['agent'],
},
},
options: [
@@ -68,12 +62,8 @@ export const agentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'create',
],
resource: ['agent'],
operation: ['create'],
},
},
},
@@ -85,12 +75,8 @@ export const agentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'create',
],
resource: ['agent'],
operation: ['create'],
},
},
},
@@ -107,12 +93,8 @@ export const agentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'create',
],
resource: ['agent'],
operation: ['create'],
},
},
options: [
@@ -123,7 +105,8 @@ export const agentFields: INodeProperties[] = [
{
displayName: 'Role Name or ID',
name: 'role',
description: 'Name of the role to assign to the agent. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Name of the role to assign to the agent. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getAgentRoles',
@@ -160,7 +143,8 @@ export const agentFields: INodeProperties[] = [
{
displayName: 'Group Names or IDs',
name: 'groups',
description: 'Groups in which the permissions granted by the role apply. Required only when Scope is Specified Groups - ignored otherwise. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Groups in which the permissions granted by the role apply. Required only when Scope is Specified Groups - ignored otherwise. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
@@ -179,12 +163,8 @@ export const agentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'create',
],
resource: ['agent'],
operation: ['create'],
},
},
options: [
@@ -205,7 +185,8 @@ export const agentFields: INodeProperties[] = [
name: 'department_ids',
type: 'multiOptions',
default: [],
description: 'IDs of the departments to which the agent belongs. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'IDs of the departments to which the agent belongs. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -234,7 +215,8 @@ export const agentFields: INodeProperties[] = [
name: 'location_id',
type: 'options',
default: '',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getLocations',
},
@@ -245,7 +227,8 @@ export const agentFields: INodeProperties[] = [
name: 'member_of',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of the groups that the agent is a member of. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of the groups that the agent is a member of. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -262,7 +245,8 @@ export const agentFields: INodeProperties[] = [
name: 'observer_of',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of the groups that the agent is an observer of. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of the groups that the agent is an observer of. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -338,12 +322,8 @@ export const agentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'delete',
],
resource: ['agent'],
operation: ['delete'],
},
},
},
@@ -360,12 +340,8 @@ export const agentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'get',
],
resource: ['agent'],
operation: ['get'],
},
},
},
@@ -381,12 +357,8 @@ export const agentFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'getAll',
],
resource: ['agent'],
operation: ['getAll'],
},
},
},
@@ -401,15 +373,9 @@ export const agentFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['agent'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -421,12 +387,8 @@ export const agentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'getAll',
],
resource: ['agent'],
operation: ['getAll'],
},
},
options: [
@@ -435,7 +397,8 @@ export const agentFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department to which the agent belongs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department to which the agent belongs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -477,7 +440,8 @@ export const agentFields: INodeProperties[] = [
name: 'location_id',
type: 'options',
default: '',
description: 'Choose from the list or specify an ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Choose from the list or specify an ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getLocations',
},
@@ -509,12 +473,8 @@ export const agentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'update',
],
resource: ['agent'],
operation: ['update'],
},
},
},
@@ -526,12 +486,8 @@ export const agentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'agent',
],
operation: [
'update',
],
resource: ['agent'],
operation: ['update'],
},
},
options: [
@@ -552,7 +508,8 @@ export const agentFields: INodeProperties[] = [
name: 'department_ids',
type: 'multiOptions',
default: [],
description: 'IDs of the departments to which the agent belongs. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'IDs of the departments to which the agent belongs. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -594,7 +551,8 @@ export const agentFields: INodeProperties[] = [
name: 'location_id',
type: 'options',
default: '',
description: 'Choose from the list or specify an ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Choose from the list or specify an ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getLocations',
},
@@ -605,7 +563,8 @@ export const agentFields: INodeProperties[] = [
name: 'member_of',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of the groups that the agent is a member of. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of the groups that the agent is a member of. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -622,7 +581,8 @@ export const agentFields: INodeProperties[] = [
name: 'observer_of',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of the groups that the agent is an observer of. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of the groups that the agent is an observer of. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const agentGroupOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const agentGroupOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'agentGroup',
],
resource: ['agentGroup'],
},
},
options: [
@@ -63,12 +59,8 @@ export const agentGroupFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agentGroup',
],
operation: [
'create',
],
resource: ['agentGroup'],
operation: ['create'],
},
},
},
@@ -80,12 +72,8 @@ export const agentGroupFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'agentGroup',
],
operation: [
'create',
],
resource: ['agentGroup'],
operation: ['create'],
},
},
options: [
@@ -103,14 +91,16 @@ export const agentGroupFields: INodeProperties[] = [
typeOptions: {
loadOptionsMethod: 'getAgents',
},
description: 'ID of the user to whom an escalation email is sent if a ticket in this group is unassigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the user to whom an escalation email is sent if a ticket in this group is unassigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Member Names or IDs',
name: 'members',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of agents who are members of this group. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of agents who are members of this group. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -120,7 +110,8 @@ export const agentGroupFields: INodeProperties[] = [
name: 'observers',
type: 'multiOptions',
default: [],
description: 'Comma-separated agent IDs who are observers of this group. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated agent IDs who are observers of this group. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -128,7 +119,8 @@ export const agentGroupFields: INodeProperties[] = [
{
displayName: 'Unassigned For',
name: 'unassigned_for',
description: 'Time after which an escalation email is sent if a ticket in the group remains unassigned',
description:
'Time after which an escalation email is sent if a ticket in the group remains unassigned',
type: 'options',
default: '30m',
options: [
@@ -181,12 +173,8 @@ export const agentGroupFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agentGroup',
],
operation: [
'delete',
],
resource: ['agentGroup'],
operation: ['delete'],
},
},
},
@@ -203,12 +191,8 @@ export const agentGroupFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agentGroup',
],
operation: [
'get',
],
resource: ['agentGroup'],
operation: ['get'],
},
},
},
@@ -224,12 +208,8 @@ export const agentGroupFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'agentGroup',
],
operation: [
'getAll',
],
resource: ['agentGroup'],
operation: ['getAll'],
},
},
},
@@ -244,15 +224,9 @@ export const agentGroupFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'agentGroup',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['agentGroup'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -269,12 +243,8 @@ export const agentGroupFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agentGroup',
],
operation: [
'update',
],
resource: ['agentGroup'],
operation: ['update'],
},
},
},
@@ -286,12 +256,8 @@ export const agentGroupFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'agentGroup',
],
operation: [
'update',
],
resource: ['agentGroup'],
operation: ['update'],
},
},
options: [
@@ -306,7 +272,8 @@ export const agentGroupFields: INodeProperties[] = [
name: 'escalate_to',
type: 'options',
default: '',
description: 'ID of the agent to whom an escalation email is sent if a ticket in this group is unassigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent to whom an escalation email is sent if a ticket in this group is unassigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -316,7 +283,8 @@ export const agentGroupFields: INodeProperties[] = [
name: 'members',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of agents who are members of this group. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of agents who are members of this group. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -332,7 +300,8 @@ export const agentGroupFields: INodeProperties[] = [
name: 'observers',
type: 'multiOptions',
default: [],
description: 'Comma-separated agent user IDs who are observers of this group. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated agent user IDs who are observers of this group. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -340,7 +309,8 @@ export const agentGroupFields: INodeProperties[] = [
{
displayName: 'Unassigned For',
name: 'unassigned_for',
description: 'Time after which an escalation email is sent if a ticket in the group remains unassigned',
description:
'Time after which an escalation email is sent if a ticket in the group remains unassigned',
type: 'options',
default: '30m',
options: [

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const agentRoleOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const agentRoleOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'agentRole',
],
resource: ['agentRole'],
},
},
options: [
@@ -46,12 +42,8 @@ export const agentRoleFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'agentRole',
],
operation: [
'get',
],
resource: ['agentRole'],
operation: ['get'],
},
},
},
@@ -67,12 +59,8 @@ export const agentRoleFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'agentRole',
],
operation: [
'getAll',
],
resource: ['agentRole'],
operation: ['getAll'],
},
},
},
@@ -87,15 +75,9 @@ export const agentRoleFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'agentRole',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['agentRole'],
operation: ['getAll'],
returnAll: [false],
},
},
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const announcementOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const announcementOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'announcement',
],
resource: ['announcement'],
},
},
options: [
@@ -63,12 +59,8 @@ export const announcementFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'create',
],
resource: ['announcement'],
operation: ['create'],
},
},
},
@@ -81,12 +73,8 @@ export const announcementFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'create',
],
resource: ['announcement'],
operation: ['create'],
},
},
},
@@ -112,12 +100,8 @@ export const announcementFields: INodeProperties[] = [
],
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'create',
],
resource: ['announcement'],
operation: ['create'],
},
},
},
@@ -130,12 +114,8 @@ export const announcementFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'create',
],
resource: ['announcement'],
operation: ['create'],
},
},
},
@@ -147,12 +127,8 @@ export const announcementFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'create',
],
resource: ['announcement'],
operation: ['create'],
},
},
options: [
@@ -161,14 +137,16 @@ export const announcementFields: INodeProperties[] = [
name: 'additional_emails',
type: 'string',
default: '',
description: 'Comma-separated additional email addresses to which the announcement needs to be sent',
description:
'Comma-separated additional email addresses to which the announcement needs to be sent',
},
{
displayName: 'Department Names or IDs',
name: 'departments',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of departments that may view this announcement. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of departments that may view this announcement. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -202,12 +180,8 @@ export const announcementFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'delete',
],
resource: ['announcement'],
operation: ['delete'],
},
},
},
@@ -224,12 +198,8 @@ export const announcementFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'get',
],
resource: ['announcement'],
operation: ['get'],
},
},
},
@@ -245,12 +215,8 @@ export const announcementFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'getAll',
],
resource: ['announcement'],
operation: ['getAll'],
},
},
},
@@ -265,15 +231,9 @@ export const announcementFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['announcement'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -290,12 +250,8 @@ export const announcementFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'update',
],
resource: ['announcement'],
operation: ['update'],
},
},
},
@@ -307,12 +263,8 @@ export const announcementFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'announcement',
],
operation: [
'update',
],
resource: ['announcement'],
operation: ['update'],
},
},
options: [
@@ -321,7 +273,8 @@ export const announcementFields: INodeProperties[] = [
name: 'additional_emails',
type: 'string',
default: '',
description: 'Comma-separated additional email addresses to which the announcement needs to be sent',
description:
'Comma-separated additional email addresses to which the announcement needs to be sent',
},
{
displayName: 'Body',
@@ -335,7 +288,8 @@ export const announcementFields: INodeProperties[] = [
name: 'departments',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of departments that may view this announcement. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of departments that may view this announcement. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const assetOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const assetOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'asset',
],
resource: ['asset'],
},
},
options: [
@@ -63,12 +59,8 @@ export const assetFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'create',
],
resource: ['asset'],
operation: ['create'],
},
},
},
@@ -76,7 +68,8 @@ export const assetFields: INodeProperties[] = [
displayName: 'Asset Type Name or ID',
name: 'assetTypeId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
required: true,
default: '',
typeOptions: {
@@ -84,12 +77,8 @@ export const assetFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'create',
],
resource: ['asset'],
operation: ['create'],
},
},
},
@@ -103,12 +92,8 @@ export const assetFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'create',
],
resource: ['asset'],
operation: ['create'],
},
},
default: {},
@@ -122,13 +107,12 @@ export const assetFields: INodeProperties[] = [
name: 'name',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'assetTypeId',
],
loadOptionsDependsOn: ['assetTypeId'],
loadOptionsMethod: 'getAssetTypeFields',
},
default: '',
description: 'The ID of the field to add custom field to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The ID of the field to add custom field to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Value',
@@ -153,12 +137,8 @@ export const assetFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'delete',
],
resource: ['asset'],
operation: ['delete'],
},
},
},
@@ -175,12 +155,8 @@ export const assetFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'get',
],
resource: ['asset'],
operation: ['get'],
},
},
},
@@ -196,12 +172,8 @@ export const assetFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'getAll',
],
resource: ['asset'],
operation: ['getAll'],
},
},
},
@@ -216,15 +188,9 @@ export const assetFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['asset'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -236,12 +202,8 @@ export const assetFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'getAll',
],
resource: ['asset'],
operation: ['getAll'],
},
},
options: [
@@ -250,7 +212,8 @@ export const assetFields: INodeProperties[] = [
name: 'agent_id',
type: 'options',
default: '',
description: 'ID of the agent by whom the asset is managed. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent by whom the asset is managed. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -267,7 +230,8 @@ export const assetFields: INodeProperties[] = [
name: 'asset_type_id',
type: 'options',
default: '',
description: 'ID of the asset type to filter by. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the asset type to filter by. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAssetTypes',
},
@@ -277,7 +241,8 @@ export const assetFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department to which the asset belongs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department to which the asset belongs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -287,7 +252,8 @@ export const assetFields: INodeProperties[] = [
name: 'location_id',
type: 'options',
default: '',
description: 'ID of the location to filter by. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the location to filter by. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getLocations',
},
@@ -314,12 +280,8 @@ export const assetFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'update',
],
resource: ['asset'],
operation: ['update'],
},
},
},
@@ -333,12 +295,8 @@ export const assetFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'asset',
],
operation: [
'update',
],
resource: ['asset'],
operation: ['update'],
},
},
default: {},
@@ -352,13 +310,12 @@ export const assetFields: INodeProperties[] = [
name: 'name',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'assetTypeId',
],
loadOptionsDependsOn: ['assetTypeId'],
loadOptionsMethod: 'getAssetTypeFields',
},
default: '',
description: 'The ID of the field to add custom field to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The ID of the field to add custom field to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Value',

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const assetTypeOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const assetTypeOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'assetType',
],
resource: ['assetType'],
},
},
options: [
@@ -63,12 +59,8 @@ export const assetTypeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'assetType',
],
operation: [
'create',
],
resource: ['assetType'],
operation: ['create'],
},
},
},
@@ -80,12 +72,8 @@ export const assetTypeFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'assetType',
],
operation: [
'create',
],
resource: ['assetType'],
operation: ['create'],
},
},
options: [
@@ -98,7 +86,8 @@ export const assetTypeFields: INodeProperties[] = [
{
displayName: 'Parent Asset Type Name or ID',
name: 'parent_asset_type_id',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
type: 'options',
default: '',
typeOptions: {
@@ -120,12 +109,8 @@ export const assetTypeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'assetType',
],
operation: [
'delete',
],
resource: ['assetType'],
operation: ['delete'],
},
},
},
@@ -142,12 +127,8 @@ export const assetTypeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'assetType',
],
operation: [
'get',
],
resource: ['assetType'],
operation: ['get'],
},
},
},
@@ -163,12 +144,8 @@ export const assetTypeFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'assetType',
],
operation: [
'getAll',
],
resource: ['assetType'],
operation: ['getAll'],
},
},
},
@@ -183,15 +160,9 @@ export const assetTypeFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'assetType',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['assetType'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -208,12 +179,8 @@ export const assetTypeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'assetType',
],
operation: [
'update',
],
resource: ['assetType'],
operation: ['update'],
},
},
},
@@ -225,12 +192,8 @@ export const assetTypeFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'assetType',
],
operation: [
'update',
],
resource: ['assetType'],
operation: ['update'],
},
},
options: [

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const changeOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const changeOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'change',
],
resource: ['change'],
},
},
options: [
@@ -59,7 +55,8 @@ export const changeFields: INodeProperties[] = [
displayName: 'Requester Name or ID',
name: 'requesterId',
// eslint-disable-next-line n8n-nodes-base/node-param-description-wrong-for-dynamic-options
description: 'ID of the requester of the change. Choose from the list or specify an ID. You can also specify the ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the requester of the change. Choose from the list or specify an ID. You can also specify the ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
type: 'options',
required: true,
default: '',
@@ -68,12 +65,8 @@ export const changeFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'create',
],
resource: ['change'],
operation: ['create'],
},
},
},
@@ -85,12 +78,8 @@ export const changeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'create',
],
resource: ['change'],
operation: ['create'],
},
},
},
@@ -102,12 +91,8 @@ export const changeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'create',
],
resource: ['change'],
operation: ['create'],
},
},
},
@@ -119,12 +104,8 @@ export const changeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'create',
],
resource: ['change'],
operation: ['create'],
},
},
},
@@ -136,12 +117,8 @@ export const changeFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'create',
],
resource: ['change'],
operation: ['create'],
},
},
options: [
@@ -150,7 +127,8 @@ export const changeFields: INodeProperties[] = [
name: 'agent_id',
type: 'options',
default: '',
description: 'ID of the agent to whom the change is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent to whom the change is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -184,7 +162,8 @@ export const changeFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department requesting the change. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department requesting the change. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -201,7 +180,8 @@ export const changeFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the agent group to which the change is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent group to which the change is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -328,12 +308,8 @@ export const changeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'delete',
],
resource: ['change'],
operation: ['delete'],
},
},
},
@@ -350,12 +326,8 @@ export const changeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'get',
],
resource: ['change'],
operation: ['get'],
},
},
},
@@ -371,12 +343,8 @@ export const changeFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'getAll',
],
resource: ['change'],
operation: ['getAll'],
},
},
},
@@ -391,15 +359,9 @@ export const changeFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['change'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -411,12 +373,8 @@ export const changeFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'getAll',
],
resource: ['change'],
operation: ['getAll'],
},
},
options: [
@@ -485,12 +443,8 @@ export const changeFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'update',
],
resource: ['change'],
operation: ['update'],
},
},
},
@@ -502,12 +456,8 @@ export const changeFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'change',
],
operation: [
'update',
],
resource: ['change'],
operation: ['update'],
},
},
options: [
@@ -516,7 +466,8 @@ export const changeFields: INodeProperties[] = [
name: 'agent_id',
type: 'options',
default: '',
description: 'ID of the agent to whom the change is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent to whom the change is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -550,7 +501,8 @@ export const changeFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department requesting the change. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department requesting the change. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -567,7 +519,8 @@ export const changeFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the agent group to which the change is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent group to which the change is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -622,7 +575,8 @@ export const changeFields: INodeProperties[] = [
name: 'requester_id',
type: 'options',
default: '',
description: 'ID of the requester of the change. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the requester of the change. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getRequesters',
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const departmentOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const departmentOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'department',
],
resource: ['department'],
},
},
options: [
@@ -63,12 +59,8 @@ export const departmentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'create',
],
resource: ['department'],
operation: ['create'],
},
},
},
@@ -80,12 +72,8 @@ export const departmentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'create',
],
resource: ['department'],
operation: ['create'],
},
},
options: [
@@ -117,12 +105,8 @@ export const departmentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'delete',
],
resource: ['department'],
operation: ['delete'],
},
},
},
@@ -139,12 +123,8 @@ export const departmentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'get',
],
resource: ['department'],
operation: ['get'],
},
},
},
@@ -160,12 +140,8 @@ export const departmentFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'getAll',
],
resource: ['department'],
operation: ['getAll'],
},
},
},
@@ -180,15 +156,9 @@ export const departmentFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['department'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -200,12 +170,8 @@ export const departmentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'getAll',
],
resource: ['department'],
operation: ['getAll'],
},
},
options: [
@@ -231,12 +197,8 @@ export const departmentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'update',
],
resource: ['department'],
operation: ['update'],
},
},
},
@@ -248,12 +210,8 @@ export const departmentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'department',
],
operation: [
'update',
],
resource: ['department'],
operation: ['update'],
},
},
options: [

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const locationOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const locationOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'location',
],
resource: ['location'],
},
},
options: [
@@ -64,12 +60,8 @@ export const locationFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'location',
],
operation: [
'create',
],
resource: ['location'],
operation: ['create'],
},
},
},
@@ -81,12 +73,8 @@ export const locationFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'location',
],
operation: [
'create',
],
resource: ['location'],
operation: ['create'],
},
},
options: [
@@ -156,12 +144,8 @@ export const locationFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'location',
],
operation: [
'delete',
],
resource: ['location'],
operation: ['delete'],
},
},
},
@@ -178,12 +162,8 @@ export const locationFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'location',
],
operation: [
'get',
],
resource: ['location'],
operation: ['get'],
},
},
},
@@ -199,12 +179,8 @@ export const locationFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'location',
],
operation: [
'getAll',
],
resource: ['location'],
operation: ['getAll'],
},
},
},
@@ -219,15 +195,9 @@ export const locationFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'location',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['location'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -244,12 +214,8 @@ export const locationFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'location',
],
operation: [
'update',
],
resource: ['location'],
operation: ['update'],
},
},
},
@@ -261,12 +227,8 @@ export const locationFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'location',
],
operation: [
'update',
],
resource: ['location'],
operation: ['update'],
},
},
options: [

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const problemOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const problemOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'problem',
],
resource: ['problem'],
},
},
options: [
@@ -63,19 +59,16 @@ export const problemFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'create',
],
resource: ['problem'],
operation: ['create'],
},
},
},
{
displayName: 'Requester Name or ID',
name: 'requesterId',
description: 'ID of the initiator of the problem. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the initiator of the problem. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
type: 'options',
required: true,
default: '',
@@ -84,12 +77,8 @@ export const problemFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'create',
],
resource: ['problem'],
operation: ['create'],
},
},
},
@@ -101,12 +90,8 @@ export const problemFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'create',
],
resource: ['problem'],
operation: ['create'],
},
},
},
@@ -118,12 +103,8 @@ export const problemFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'create',
],
resource: ['problem'],
operation: ['create'],
},
},
options: [
@@ -132,7 +113,8 @@ export const problemFields: INodeProperties[] = [
name: 'agent_id',
type: 'options',
default: '',
description: 'ID of the agent to whom the problem is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent to whom the problem is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -142,7 +124,8 @@ export const problemFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department initiating the problem. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department initiating the problem. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -159,7 +142,8 @@ export const problemFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the agent group to which the problem is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent group to which the problem is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -243,12 +227,8 @@ export const problemFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'delete',
],
resource: ['problem'],
operation: ['delete'],
},
},
},
@@ -265,12 +245,8 @@ export const problemFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'get',
],
resource: ['problem'],
operation: ['get'],
},
},
},
@@ -286,12 +262,8 @@ export const problemFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'getAll',
],
resource: ['problem'],
operation: ['getAll'],
},
},
},
@@ -306,15 +278,9 @@ export const problemFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['problem'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -331,12 +297,8 @@ export const problemFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'update',
],
resource: ['problem'],
operation: ['update'],
},
},
},
@@ -348,12 +310,8 @@ export const problemFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'problem',
],
operation: [
'update',
],
resource: ['problem'],
operation: ['update'],
},
},
options: [
@@ -362,7 +320,8 @@ export const problemFields: INodeProperties[] = [
name: 'agent_id',
type: 'options',
default: '',
description: 'ID of the agent to whom the problem is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent to whom the problem is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -372,7 +331,8 @@ export const problemFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department initiating the problem. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department initiating the problem. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -396,7 +356,8 @@ export const problemFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the agent group to which the problem is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent group to which the problem is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -450,7 +411,8 @@ export const problemFields: INodeProperties[] = [
name: 'requester_id',
type: 'options',
default: '',
description: 'ID of the initiator of the problem. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the initiator of the problem. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getRequesters',
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const productOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const productOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'product',
],
resource: ['product'],
},
},
options: [
@@ -59,7 +55,8 @@ export const productFields: INodeProperties[] = [
displayName: 'Asset Type Name or ID',
name: 'assetTypeId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
required: true,
default: '',
typeOptions: {
@@ -67,12 +64,8 @@ export const productFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'create',
],
resource: ['product'],
operation: ['create'],
},
},
},
@@ -84,12 +77,8 @@ export const productFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'create',
],
resource: ['product'],
operation: ['create'],
},
},
},
@@ -101,12 +90,8 @@ export const productFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'create',
],
resource: ['product'],
operation: ['create'],
},
},
options: [
@@ -178,12 +163,8 @@ export const productFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'delete',
],
resource: ['product'],
operation: ['delete'],
},
},
},
@@ -200,12 +181,8 @@ export const productFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'get',
],
resource: ['product'],
operation: ['get'],
},
},
},
@@ -221,12 +198,8 @@ export const productFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'getAll',
],
resource: ['product'],
operation: ['getAll'],
},
},
},
@@ -241,15 +214,9 @@ export const productFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['product'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -266,12 +233,8 @@ export const productFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'update',
],
resource: ['product'],
operation: ['update'],
},
},
},
@@ -283,12 +246,8 @@ export const productFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'product',
],
operation: [
'update',
],
resource: ['product'],
operation: ['update'],
},
},
options: [
@@ -296,7 +255,8 @@ export const productFields: INodeProperties[] = [
displayName: 'Asset Type Name or ID',
name: 'asset_type_id',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getAssetTypes',

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const releaseOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const releaseOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'release',
],
resource: ['release'],
},
},
options: [
@@ -63,12 +59,8 @@ export const releaseFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'create',
],
resource: ['release'],
operation: ['create'],
},
},
},
@@ -79,12 +71,8 @@ export const releaseFields: INodeProperties[] = [
default: 1,
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'create',
],
resource: ['release'],
operation: ['create'],
},
},
options: [
@@ -113,12 +101,8 @@ export const releaseFields: INodeProperties[] = [
default: 1,
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'create',
],
resource: ['release'],
operation: ['create'],
},
},
options: [
@@ -147,12 +131,8 @@ export const releaseFields: INodeProperties[] = [
default: 1,
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'create',
],
resource: ['release'],
operation: ['create'],
},
},
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
@@ -187,12 +167,8 @@ export const releaseFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'create',
],
resource: ['release'],
operation: ['create'],
},
},
},
@@ -204,12 +180,8 @@ export const releaseFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'create',
],
resource: ['release'],
operation: ['create'],
},
},
},
@@ -221,12 +193,8 @@ export const releaseFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'create',
],
resource: ['release'],
operation: ['create'],
},
},
options: [
@@ -235,7 +203,8 @@ export const releaseFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department initiating the release. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department initiating the release. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -252,7 +221,8 @@ export const releaseFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the agent group to which the release is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent group to which the release is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -272,12 +242,8 @@ export const releaseFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'delete',
],
resource: ['release'],
operation: ['delete'],
},
},
},
@@ -294,12 +260,8 @@ export const releaseFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'get',
],
resource: ['release'],
operation: ['get'],
},
},
},
@@ -315,12 +277,8 @@ export const releaseFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'getAll',
],
resource: ['release'],
operation: ['getAll'],
},
},
},
@@ -335,15 +293,9 @@ export const releaseFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['release'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -360,12 +312,8 @@ export const releaseFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'update',
],
resource: ['release'],
operation: ['update'],
},
},
},
@@ -377,12 +325,8 @@ export const releaseFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'release',
],
operation: [
'update',
],
resource: ['release'],
operation: ['update'],
},
},
options: [
@@ -391,7 +335,8 @@ export const releaseFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department initiating the release. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department initiating the release. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -408,7 +353,8 @@ export const releaseFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the agent group to which the release is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent group to which the release is assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
import { LANGUAGES } from '../constants';
export const requesterOperations: INodeProperties[] = [
@@ -11,9 +9,7 @@ export const requesterOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'requester',
],
resource: ['requester'],
},
},
options: [
@@ -64,12 +60,8 @@ export const requesterFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'create',
],
resource: ['requester'],
operation: ['create'],
},
},
},
@@ -80,12 +72,8 @@ export const requesterFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'create',
],
resource: ['requester'],
operation: ['create'],
},
},
},
@@ -97,12 +85,8 @@ export const requesterFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'create',
],
resource: ['requester'],
operation: ['create'],
},
},
options: [
@@ -123,7 +107,8 @@ export const requesterFields: INodeProperties[] = [
name: 'department_ids',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of the departments associated with the requester. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of the departments associated with the requester. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -150,7 +135,8 @@ export const requesterFields: INodeProperties[] = [
{
displayName: 'Location Name or ID',
name: 'location_id',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
type: 'options',
default: '',
typeOptions: {
@@ -207,12 +193,8 @@ export const requesterFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'delete',
],
resource: ['requester'],
operation: ['delete'],
},
},
},
@@ -229,12 +211,8 @@ export const requesterFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'get',
],
resource: ['requester'],
operation: ['get'],
},
},
},
@@ -250,12 +228,8 @@ export const requesterFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'getAll',
],
resource: ['requester'],
operation: ['getAll'],
},
},
},
@@ -270,15 +244,9 @@ export const requesterFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['requester'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -290,19 +258,16 @@ export const requesterFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'getAll',
],
resource: ['requester'],
operation: ['getAll'],
},
},
options: [
{
displayName: 'Department Name or ID',
name: 'department_id',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
type: 'options',
default: '',
typeOptions: {
@@ -338,7 +303,8 @@ export const requesterFields: INodeProperties[] = [
displayName: 'Location Name or ID',
name: 'location_id',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getLocations',
@@ -377,12 +343,8 @@ export const requesterFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'update',
],
resource: ['requester'],
operation: ['update'],
},
},
},
@@ -394,12 +356,8 @@ export const requesterFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'requester',
],
operation: [
'update',
],
resource: ['requester'],
operation: ['update'],
},
},
options: [
@@ -420,7 +378,8 @@ export const requesterFields: INodeProperties[] = [
name: 'department_ids',
type: 'multiOptions',
default: [],
description: 'Comma-separated IDs of the departments associated with the requester. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Comma-separated IDs of the departments associated with the requester. Choose from the list or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -455,7 +414,8 @@ export const requesterFields: INodeProperties[] = [
name: 'location_id',
type: 'options',
default: '',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getLocations',
},

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const requesterGroupOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const requesterGroupOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'requesterGroup',
],
resource: ['requesterGroup'],
},
},
options: [
@@ -63,12 +59,8 @@ export const requesterGroupFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requesterGroup',
],
operation: [
'create',
],
resource: ['requesterGroup'],
operation: ['create'],
},
},
},
@@ -80,12 +72,8 @@ export const requesterGroupFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'requesterGroup',
],
operation: [
'create',
],
resource: ['requesterGroup'],
operation: ['create'],
},
},
options: [
@@ -110,12 +98,8 @@ export const requesterGroupFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requesterGroup',
],
operation: [
'delete',
],
resource: ['requesterGroup'],
operation: ['delete'],
},
},
},
@@ -132,12 +116,8 @@ export const requesterGroupFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requesterGroup',
],
operation: [
'get',
],
resource: ['requesterGroup'],
operation: ['get'],
},
},
},
@@ -153,12 +133,8 @@ export const requesterGroupFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'requesterGroup',
],
operation: [
'getAll',
],
resource: ['requesterGroup'],
operation: ['getAll'],
},
},
},
@@ -173,15 +149,9 @@ export const requesterGroupFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'requesterGroup',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['requesterGroup'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -198,12 +168,8 @@ export const requesterGroupFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'requesterGroup',
],
operation: [
'update',
],
resource: ['requesterGroup'],
operation: ['update'],
},
},
},
@@ -215,12 +181,8 @@ export const requesterGroupFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'requesterGroup',
],
operation: [
'update',
],
resource: ['requesterGroup'],
operation: ['update'],
},
},
options: [

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const softwareOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const softwareOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'software',
],
resource: ['software'],
},
},
options: [
@@ -77,12 +73,8 @@ export const softwareFields: INodeProperties[] = [
default: 'desktop',
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'create',
],
resource: ['software'],
operation: ['create'],
},
},
},
@@ -94,12 +86,8 @@ export const softwareFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'create',
],
resource: ['software'],
operation: ['create'],
},
},
},
@@ -111,12 +99,8 @@ export const softwareFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'create',
],
resource: ['software'],
operation: ['create'],
},
},
options: [
@@ -171,12 +155,8 @@ export const softwareFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'delete',
],
resource: ['software'],
operation: ['delete'],
},
},
},
@@ -193,12 +173,8 @@ export const softwareFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'get',
],
resource: ['software'],
operation: ['get'],
},
},
},
@@ -214,12 +190,8 @@ export const softwareFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'getAll',
],
resource: ['software'],
operation: ['getAll'],
},
},
},
@@ -234,15 +206,9 @@ export const softwareFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['software'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -259,12 +225,8 @@ export const softwareFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'update',
],
resource: ['software'],
operation: ['update'],
},
},
},
@@ -276,12 +238,8 @@ export const softwareFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'software',
],
operation: [
'update',
],
resource: ['software'],
operation: ['update'],
},
},
options: [

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const ticketOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const ticketOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'ticket',
],
resource: ['ticket'],
},
},
options: [
@@ -65,12 +61,8 @@ export const ticketFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'create',
],
resource: ['ticket'],
operation: ['create'],
},
},
},
@@ -81,12 +73,8 @@ export const ticketFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'create',
],
resource: ['ticket'],
operation: ['create'],
},
},
},
@@ -98,12 +86,8 @@ export const ticketFields: INodeProperties[] = [
description: 'HTML supported',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'create',
],
resource: ['ticket'],
operation: ['create'],
},
},
},
@@ -114,12 +98,8 @@ export const ticketFields: INodeProperties[] = [
default: 1,
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'create',
],
resource: ['ticket'],
operation: ['create'],
},
},
options: [
@@ -148,12 +128,8 @@ export const ticketFields: INodeProperties[] = [
default: 2,
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'create',
],
resource: ['ticket'],
operation: ['create'],
},
},
options: [
@@ -183,12 +159,8 @@ export const ticketFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'create',
],
resource: ['ticket'],
operation: ['create'],
},
},
options: [
@@ -204,7 +176,8 @@ export const ticketFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department to which this ticket belongs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department to which this ticket belongs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -214,7 +187,8 @@ export const ticketFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the group to which the ticket has been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the group to which the ticket has been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -250,7 +224,8 @@ export const ticketFields: INodeProperties[] = [
displayName: 'Requester Name or ID',
name: 'requester_id',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getRequesters',
@@ -271,12 +246,8 @@ export const ticketFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'delete',
],
resource: ['ticket'],
operation: ['delete'],
},
},
},
@@ -293,12 +264,8 @@ export const ticketFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'get',
],
resource: ['ticket'],
operation: ['get'],
},
},
},
@@ -314,12 +281,8 @@ export const ticketFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'getAll',
],
resource: ['ticket'],
operation: ['getAll'],
},
},
},
@@ -334,15 +297,9 @@ export const ticketFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['ticket'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -354,12 +311,8 @@ export const ticketFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'getAll',
],
resource: ['ticket'],
operation: ['getAll'],
},
},
options: [
@@ -368,7 +321,8 @@ export const ticketFields: INodeProperties[] = [
name: 'agent_id',
type: 'options',
default: '',
description: 'ID of the agent to whom the tickets have been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the agent to whom the tickets have been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgents',
},
@@ -378,7 +332,8 @@ export const ticketFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the group to which the tickets have been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the group to which the tickets have been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},
@@ -480,12 +435,8 @@ export const ticketFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'update',
],
resource: ['ticket'],
operation: ['update'],
},
},
},
@@ -497,12 +448,8 @@ export const ticketFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'update',
],
resource: ['ticket'],
operation: ['update'],
},
},
options: [
@@ -511,7 +458,8 @@ export const ticketFields: INodeProperties[] = [
name: 'department_id',
type: 'options',
default: '',
description: 'ID of the department to which this ticket has been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the department to which this ticket has been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getDepartments',
},
@@ -536,7 +484,8 @@ export const ticketFields: INodeProperties[] = [
name: 'group_id',
type: 'options',
default: '',
description: 'ID of the group to which the ticket has been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the group to which the ticket has been assigned. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getAgentGroups',
},

View File

@@ -22,11 +22,11 @@ export type RolesParameter = IDataObject & {
role: number;
assignment_scope: 'entire_helpdesk' | 'member_groups' | 'specified_groups' | 'assigned_items';
groups?: number[];
}>
}>;
};
export type AddressFixedCollection = {
address?: {
addressFields: object
}
}
addressFields: object;
};
};