mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
refactor: Apply more eslint-plugin-n8n-nodes-base
rules (#3624)
* ⬆️ Upgrade `eslint-plugin-n8n-nodes-base` * 📦 Update `package-lock.json` * 🔧 Adjust renamed filesystem rules * ✏️ Alphabetize ruleset * ⚡ Categorize overrides * ⚡ Set renamings in lint exceptions * ⚡ Run baseline `lintfix` * ⚡ Update linting scripts * 👕 Apply `node-param-description-missing-from-dynamic-multi-options` * 👕 Apply `cred-class-field-name-missing-oauth2` (#3627) * Rule working as intended * Removed comments * Move cred rule to different rule set * 👕 Apply `node-param-array-type-assertion` * 👕 Apply `node-dirname-against-convention` * Apply `cred-class-field-display-name-oauth2` (#3628) * Apply `node-execute-block-wrong-error-thrown` * Apply `node-class-description-display-name-unsuffixed-trigger-node` * Apply `node-class-description-name-unsuffixed-trigger-node` * Apply `cred-class-name-missing-oauth2-suffix` (#3636) * Rule working as intended, add exception to existing nodes * 👕 Apply `cred-class-field-name-uppercase-first-char` (#3638) * ⬆️ Upgrade to plugin version 1.2.28 * 📦 Update `package-lock.json` * 👕 Update lintings with 1.2.8 change * 👕 Apply `cred-class-field-name-unsuffixed` * 👕 Apply `cred-class-name-unsuffixed` * 👕 Apply `node-class-description-credentials-name-unsuffixed` * ✏️ Alphabetize rules * ➖ Remove `nodelinter` package * 📦 Update `package-lock.json` * ⚡ Consolidate `lint` and `lintfix` scripts Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com>
This commit is contained in:
parent
6b9289349f
commit
59f2e8e7d5
31
.eslintrc.js
31
.eslintrc.js
|
@ -371,21 +371,38 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
files: [
|
files: ['./packages/nodes-base/credentials/*.credentials.ts'],
|
||||||
'./packages/nodes-base/nodes/**/*.ts',
|
|
||||||
'./packages/nodes-base/credentials/*.credentials.ts',
|
|
||||||
],
|
|
||||||
plugins: ['eslint-plugin-n8n-nodes-base'],
|
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||||
rules: {
|
rules: {
|
||||||
'n8n-nodes-base/filesystem-wrong-cred-filename': 'error',
|
'n8n-nodes-base/cred-class-field-display-name-missing-oauth2': 'error',
|
||||||
'n8n-nodes-base/filesystem-wrong-node-filename': 'error',
|
'n8n-nodes-base/cred-class-field-name-missing-oauth2': 'error',
|
||||||
|
'n8n-nodes-base/cred-class-field-name-unsuffixed': 'error',
|
||||||
|
'n8n-nodes-base/cred-class-field-name-uppercase-first-char': 'error',
|
||||||
|
'n8n-nodes-base/cred-class-name-missing-oauth2-suffix': 'error',
|
||||||
|
'n8n-nodes-base/cred-class-name-unsuffixed': 'error',
|
||||||
|
'n8n-nodes-base/cred-filename-against-convention': 'error',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['./packages/nodes-base/nodes/**/*.ts'],
|
||||||
|
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||||
|
rules: {
|
||||||
|
'n8n-nodes-base/node-class-description-credentials-name-unsuffixed': 'error',
|
||||||
|
'n8n-nodes-base/node-class-description-display-name-unsuffixed-trigger-node': 'error',
|
||||||
'n8n-nodes-base/node-class-description-empty-string': 'error',
|
'n8n-nodes-base/node-class-description-empty-string': 'error',
|
||||||
'n8n-nodes-base/node-class-description-icon-not-svg': 'error',
|
'n8n-nodes-base/node-class-description-icon-not-svg': 'error',
|
||||||
|
'n8n-nodes-base/node-class-description-inputs-wrong-regular-node': 'error',
|
||||||
'n8n-nodes-base/node-class-description-inputs-wrong-trigger-node': 'error',
|
'n8n-nodes-base/node-class-description-inputs-wrong-trigger-node': 'error',
|
||||||
'n8n-nodes-base/node-class-description-missing-subtitle': 'error',
|
'n8n-nodes-base/node-class-description-missing-subtitle': 'error',
|
||||||
|
'n8n-nodes-base/node-class-description-name-unsuffixed-trigger-node': 'error',
|
||||||
'n8n-nodes-base/node-class-description-outputs-wrong': 'error',
|
'n8n-nodes-base/node-class-description-outputs-wrong': 'error',
|
||||||
|
'n8n-nodes-base/node-dirname-against-convention': 'error',
|
||||||
'n8n-nodes-base/node-execute-block-double-assertion-for-items': 'error',
|
'n8n-nodes-base/node-execute-block-double-assertion-for-items': 'error',
|
||||||
|
'n8n-nodes-base/node-execute-block-wrong-error-thrown': 'error',
|
||||||
|
'n8n-nodes-base/node-filename-against-convention': 'error',
|
||||||
|
'n8n-nodes-base/node-param-array-type-assertion': 'error',
|
||||||
'n8n-nodes-base/node-param-collection-type-unsorted-items': 'error',
|
'n8n-nodes-base/node-param-collection-type-unsorted-items': 'error',
|
||||||
|
'n8n-nodes-base/node-param-color-type-unused': 'error',
|
||||||
'n8n-nodes-base/node-param-default-missing': 'error',
|
'n8n-nodes-base/node-param-default-missing': 'error',
|
||||||
'n8n-nodes-base/node-param-default-wrong-for-boolean': 'error',
|
'n8n-nodes-base/node-param-default-wrong-for-boolean': 'error',
|
||||||
'n8n-nodes-base/node-param-default-wrong-for-collection': 'error',
|
'n8n-nodes-base/node-param-default-wrong-for-collection': 'error',
|
||||||
|
@ -410,6 +427,7 @@ module.exports = {
|
||||||
'n8n-nodes-base/node-param-description-missing-for-ignore-ssl-issues': 'error',
|
'n8n-nodes-base/node-param-description-missing-for-ignore-ssl-issues': 'error',
|
||||||
'n8n-nodes-base/node-param-description-missing-for-return-all': 'error',
|
'n8n-nodes-base/node-param-description-missing-for-return-all': 'error',
|
||||||
'n8n-nodes-base/node-param-description-missing-for-simplify': 'error',
|
'n8n-nodes-base/node-param-description-missing-for-simplify': 'error',
|
||||||
|
'n8n-nodes-base/node-param-description-missing-from-dynamic-multi-options': 'error',
|
||||||
'n8n-nodes-base/node-param-description-missing-from-dynamic-options': 'error',
|
'n8n-nodes-base/node-param-description-missing-from-dynamic-options': 'error',
|
||||||
'n8n-nodes-base/node-param-description-missing-from-limit': 'error',
|
'n8n-nodes-base/node-param-description-missing-from-limit': 'error',
|
||||||
'n8n-nodes-base/node-param-description-unencoded-angle-brackets': 'error',
|
'n8n-nodes-base/node-param-description-unencoded-angle-brackets': 'error',
|
||||||
|
@ -448,7 +466,6 @@ module.exports = {
|
||||||
'n8n-nodes-base/node-param-resource-with-plural-option': 'error',
|
'n8n-nodes-base/node-param-resource-with-plural-option': 'error',
|
||||||
'n8n-nodes-base/node-param-resource-without-no-data-expression': 'error',
|
'n8n-nodes-base/node-param-resource-without-no-data-expression': 'error',
|
||||||
'n8n-nodes-base/node-param-type-options-missing-from-limit': 'error',
|
'n8n-nodes-base/node-param-type-options-missing-from-limit': 'error',
|
||||||
'n8n-nodes-base/node-class-description-inputs-wrong-regular-node': 'error',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
31762
package-lock.json
generated
31762
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -12,8 +12,11 @@ const scopes = [
|
||||||
'crm.schemas.deals.read',
|
'crm.schemas.deals.read',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// eslint-disable-next-line n8n-nodes-base/cred-class-name-missing-oauth2-suffix
|
||||||
export class HubspotDeveloperApi implements ICredentialType {
|
export class HubspotDeveloperApi implements ICredentialType {
|
||||||
|
// eslint-disable-next-line n8n-nodes-base/cred-class-field-name-missing-oauth2
|
||||||
name = 'hubspotDeveloperApi';
|
name = 'hubspotDeveloperApi';
|
||||||
|
// eslint-disable-next-line n8n-nodes-base/cred-class-field-display-name-missing-oauth2
|
||||||
displayName = 'HubSpot Developer API';
|
displayName = 'HubSpot Developer API';
|
||||||
documentationUrl = 'hubspot';
|
documentationUrl = 'hubspot';
|
||||||
extends = [
|
extends = [
|
||||||
|
|
|
@ -50,6 +50,7 @@ export class ActiveCampaignTrigger implements INodeType {
|
||||||
displayName: 'Event Names or IDs',
|
displayName: 'Event Names or IDs',
|
||||||
name: 'events',
|
name: 'events',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getEvents',
|
loadOptionsMethod: 'getEvents',
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
export const createEmployeeSharedDescription = (sync = false): INodeProperties[] => {
|
export const createEmployeeSharedDescription = (sync = false): INodeProperties[] => {
|
||||||
let elements = [
|
let elements: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName: 'Address',
|
displayName: 'Address',
|
||||||
name: 'address',
|
name: 'address',
|
||||||
|
@ -290,7 +290,7 @@ export const createEmployeeSharedDescription = (sync = false): INodeProperties[]
|
||||||
placeholder: '123-45-6789',
|
placeholder: '123-45-6789',
|
||||||
description: 'A standard United States Social Security number, with dashes',
|
description: 'A standard United States Social Security number, with dashes',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
||||||
if (sync === true) {
|
if (sync === true) {
|
||||||
elements = elements.map(element => {
|
elements = elements.map(element => {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
export const updateEmployeeSharedDescription = (sync = false): INodeProperties[] => {
|
export const updateEmployeeSharedDescription = (sync = false): INodeProperties[] => {
|
||||||
let elements = [
|
let elements: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName: 'Address',
|
displayName: 'Address',
|
||||||
name: 'addasasress',
|
name: 'addasasress',
|
||||||
|
@ -316,7 +316,7 @@ export const updateEmployeeSharedDescription = (sync = false): INodeProperties[]
|
||||||
placeholder: '123-45-6789',
|
placeholder: '123-45-6789',
|
||||||
description: 'A standard United States Social Security number, with dashes',
|
description: 'A standard United States Social Security number, with dashes',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
||||||
if (sync === true) {
|
if (sync === true) {
|
||||||
elements = elements.map(element => {
|
elements = elements.map(element => {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
|
@ -94,6 +94,7 @@ export const linkFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
|
@ -226,6 +227,7 @@ export const linkFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
|
|
|
@ -243,6 +243,7 @@ export const taskFields: INodeProperties[] = [
|
||||||
displayName: 'Assignee Names or IDs',
|
displayName: 'Assignee Names or IDs',
|
||||||
name: 'assignees',
|
name: 'assignees',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getAssignees',
|
loadOptionsMethod: 'getAssignees',
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
|
@ -731,6 +732,7 @@ export const taskFields: INodeProperties[] = [
|
||||||
displayName: 'Assignee Names or IDs',
|
displayName: 'Assignee Names or IDs',
|
||||||
name: 'assignees',
|
name: 'assignees',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getAssignees',
|
loadOptionsMethod: 'getAssignees',
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
|
@ -903,6 +905,7 @@ export const taskFields: INodeProperties[] = [
|
||||||
displayName: 'Status Names or IDs',
|
displayName: 'Status Names or IDs',
|
||||||
name: 'statuses',
|
name: 'statuses',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getStatuses',
|
loadOptionsMethod: 'getStatuses',
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
|
|
|
@ -468,6 +468,7 @@ export const timeEntryFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'team',
|
'team',
|
||||||
|
@ -860,6 +861,7 @@ export const timeEntryFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'spaceId',
|
'spaceId',
|
||||||
|
|
|
@ -237,6 +237,7 @@ export const timeEntryTagFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tagNames',
|
name: 'tagNames',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTimeEntryTags',
|
loadOptionsMethod: 'getTimeEntryTags',
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
|
|
|
@ -283,6 +283,7 @@ export const projectFields: INodeProperties[] = [
|
||||||
displayName: 'Client Names or IDs',
|
displayName: 'Client Names or IDs',
|
||||||
name: 'clients',
|
name: 'clients',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'workspaceId',
|
'workspaceId',
|
||||||
|
|
|
@ -111,6 +111,7 @@ export const taskFields: INodeProperties[] = [
|
||||||
displayName: 'Assignee Names or IDs',
|
displayName: 'Assignee Names or IDs',
|
||||||
name: 'assigneeIds',
|
name: 'assigneeIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'loadUsersForWorkspace',
|
loadOptionsMethod: 'loadUsersForWorkspace',
|
||||||
|
@ -319,6 +320,7 @@ export const taskFields: INodeProperties[] = [
|
||||||
displayName: 'Assignee Names or IDs',
|
displayName: 'Assignee Names or IDs',
|
||||||
name: 'assigneeIds',
|
name: 'assigneeIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'loadUsersForWorkspace',
|
loadOptionsMethod: 'loadUsersForWorkspace',
|
||||||
|
|
|
@ -158,6 +158,7 @@ export const timeEntryFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tagIds',
|
name: 'tagIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'workspaceId',
|
'workspaceId',
|
||||||
|
@ -369,6 +370,7 @@ export const timeEntryFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tagIds',
|
name: 'tagIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'workspaceId',
|
'workspaceId',
|
||||||
|
|
|
@ -93,6 +93,7 @@ export const userFields: INodeProperties[] = [
|
||||||
displayName: 'Email',
|
displayName: 'Email',
|
||||||
name: 'email',
|
name: 'email',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
placeholder: 'name@email.com',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'If provided, you\'ll get a filtered list of users that contain the provided string in their email address',
|
description: 'If provided, you\'ll get a filtered list of users that contain the provided string in their email address',
|
||||||
},
|
},
|
||||||
|
|
|
@ -481,8 +481,8 @@ export class DateTime implements INodeType {
|
||||||
const dataPropertyName = this.getNodeParameter('dataPropertyName', i) as string;
|
const dataPropertyName = this.getNodeParameter('dataPropertyName', i) as string;
|
||||||
|
|
||||||
const newDate = fromFormat
|
const newDate = fromFormat
|
||||||
? parseDateByFormat(dateValue, fromFormat)
|
? parseDateByFormat.call(this, dateValue, fromFormat)
|
||||||
: parseDateByDefault(dateValue);
|
: parseDateByDefault.call(this, dateValue);
|
||||||
|
|
||||||
operation === 'add'
|
operation === 'add'
|
||||||
? newDate.add(duration, timeUnit).utc().format()
|
? newDate.add(duration, timeUnit).utc().format()
|
||||||
|
@ -536,24 +536,24 @@ export class DateTime implements INodeType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseDateByFormat(value: string, fromFormat: string) {
|
function parseDateByFormat(this: IExecuteFunctions, value: string, fromFormat: string) {
|
||||||
const date = moment(value, fromFormat, true);
|
const date = moment(value, fromFormat, true);
|
||||||
if (moment(date).isValid()) return date;
|
if (moment(date).isValid()) return date;
|
||||||
|
|
||||||
throw new Error('Date input cannot be parsed. Please recheck the value and the "From Format" field.');
|
throw new NodeOperationError(this.getNode(), 'Date input cannot be parsed. Please recheck the value and the "From Format" field.');
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseDateByDefault(value: string) {
|
function parseDateByDefault(this: IExecuteFunctions, value: string) {
|
||||||
const isoValue = getIsoValue(value);
|
const isoValue = getIsoValue.call(this, value);
|
||||||
if (moment(isoValue).isValid()) return moment(isoValue);
|
if (moment(isoValue).isValid()) return moment(isoValue);
|
||||||
|
|
||||||
throw new Error('Unrecognized date input. Please specify a format in the "From Format" field.');
|
throw new NodeOperationError(this.getNode(), 'Unrecognized date input. Please specify a format in the "From Format" field.');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIsoValue(value: string) {
|
function getIsoValue(this: IExecuteFunctions, value: string) {
|
||||||
try {
|
try {
|
||||||
return new Date(value).toISOString(); // may throw due to unpredictable input
|
return new Date(value).toISOString(); // may throw due to unpredictable input
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error('Unrecognized date input. Please specify a format in the "From Format" field.');
|
throw new NodeOperationError(this.getNode(), 'Unrecognized date input. Please specify a format in the "From Format" field.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ import {
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
INodeType,
|
INodeType,
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
|
NodeApiError,
|
||||||
|
NodeOperationError,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,7 +124,7 @@ export class Discord implements INodeType {
|
||||||
|
|
||||||
const webhookUri = this.getNodeParameter('webhookUri', 0, '') as string;
|
const webhookUri = this.getNodeParameter('webhookUri', 0, '') as string;
|
||||||
|
|
||||||
if (!webhookUri) throw Error('Webhook uri is required.');
|
if (!webhookUri) throw new NodeOperationError(this.getNode(), 'Webhook uri is required.');
|
||||||
|
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
const length = items.length as number;
|
const length = items.length as number;
|
||||||
|
@ -134,17 +136,17 @@ export class Discord implements INodeType {
|
||||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||||
|
|
||||||
if (!body.content && !options.embeds) {
|
if (!body.content && !options.embeds) {
|
||||||
throw new Error('Either content or embeds must be set.');
|
throw new NodeOperationError(this.getNode(), 'Either content or embeds must be set.');
|
||||||
}
|
}
|
||||||
if (options.embeds) {
|
if (options.embeds) {
|
||||||
try {
|
try {
|
||||||
//@ts-expect-error
|
//@ts-expect-error
|
||||||
body.embeds = JSON.parse(options.embeds);
|
body.embeds = JSON.parse(options.embeds);
|
||||||
if (!Array.isArray(body.embeds)) {
|
if (!Array.isArray(body.embeds)) {
|
||||||
throw new Error('Embeds must be an array of embeds.');
|
throw new NodeOperationError(this.getNode(), 'Embeds must be an array of embeds.');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error('Embeds must be valid JSON.');
|
throw new NodeOperationError(this.getNode(), 'Embeds must be valid JSON.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.username) {
|
if (options.username) {
|
||||||
|
@ -156,7 +158,7 @@ export class Discord implements INodeType {
|
||||||
//@ts-expect-error
|
//@ts-expect-error
|
||||||
body.components = JSON.parse(options.components);
|
body.components = JSON.parse(options.components);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error('Components must be valid JSON.');
|
throw new NodeOperationError(this.getNode(), 'Components must be valid JSON.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,8 +261,9 @@ export class Discord implements INodeType {
|
||||||
} while (--maxTries);
|
} while (--maxTries);
|
||||||
|
|
||||||
if (maxTries <= 0) {
|
if (maxTries <= 0) {
|
||||||
throw new Error(
|
throw new NodeApiError(
|
||||||
'Could not send Webhook message. Max amount of rate-limit retries reached.',
|
this.getNode(),
|
||||||
|
{ error: 'Could not send Webhook message. Max amount of rate-limit retries reached.' },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
|
@ -507,6 +507,7 @@ export const caseFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
|
|
|
@ -24,6 +24,7 @@ import {
|
||||||
|
|
||||||
export class FigmaTrigger implements INodeType {
|
export class FigmaTrigger implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
|
// eslint-disable-next-line n8n-nodes-base/node-class-description-display-name-unsuffixed-trigger-node
|
||||||
displayName: 'Figma Trigger (Beta)',
|
displayName: 'Figma Trigger (Beta)',
|
||||||
name: 'figmaTrigger',
|
name: 'figmaTrigger',
|
||||||
icon: 'file:figma.svg',
|
icon: 'file:figma.svg',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {IExecuteFunctions} from 'n8n-core';
|
import {IExecuteFunctions} from 'n8n-core';
|
||||||
import {
|
import {
|
||||||
ILoadOptionsFunctions,
|
ILoadOptionsFunctions,
|
||||||
|
|
|
@ -179,6 +179,7 @@ export const contactFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
},
|
},
|
||||||
|
@ -640,6 +641,7 @@ export const contactFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
},
|
},
|
||||||
|
|
|
@ -120,6 +120,7 @@ export class GetResponseTrigger implements INodeType {
|
||||||
displayName: 'List Names or IDs',
|
displayName: 'List Names or IDs',
|
||||||
name: 'listIds',
|
name: 'listIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getLists',
|
loadOptionsMethod: 'getLists',
|
||||||
},
|
},
|
||||||
|
|
|
@ -207,6 +207,7 @@ export const postFields: INodeProperties[] = [
|
||||||
displayName: 'Author Names or IDs',
|
displayName: 'Author Names or IDs',
|
||||||
name: 'authors',
|
name: 'authors',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getAuthors',
|
loadOptionsMethod: 'getAuthors',
|
||||||
},
|
},
|
||||||
|
@ -306,6 +307,7 @@ export const postFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
},
|
},
|
||||||
|
@ -773,6 +775,7 @@ export const postFields: INodeProperties[] = [
|
||||||
displayName: 'Author Names or IDs',
|
displayName: 'Author Names or IDs',
|
||||||
name: 'authors',
|
name: 'authors',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getAuthors',
|
loadOptionsMethod: 'getAuthors',
|
||||||
},
|
},
|
||||||
|
@ -899,6 +902,7 @@ export const postFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
},
|
},
|
||||||
|
|
|
@ -344,6 +344,7 @@ export const contactFields: INodeProperties[] = [
|
||||||
displayName: 'Group Names or IDs',
|
displayName: 'Group Names or IDs',
|
||||||
name: 'group',
|
name: 'group',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getGroups',
|
loadOptionsMethod: 'getGroups',
|
||||||
},
|
},
|
||||||
|
@ -1409,6 +1410,7 @@ export const contactFields: INodeProperties[] = [
|
||||||
displayName: 'Group Names or IDs',
|
displayName: 'Group Names or IDs',
|
||||||
name: 'group',
|
name: 'group',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getGroups',
|
loadOptionsMethod: 'getGroups',
|
||||||
},
|
},
|
||||||
|
|
|
@ -438,6 +438,7 @@ export const channelFields: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName: 'Profile Color',
|
displayName: 'Profile Color',
|
||||||
name: 'profileColor',
|
name: 'profileColor',
|
||||||
|
// eslint-disable-next-line n8n-nodes-base/node-param-color-type-unused
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'A prominent color that complements the channel\'s content',
|
description: 'A prominent color that complements the channel\'s content',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import { IExecuteFunctions } from 'n8n-core';
|
import { IExecuteFunctions } from 'n8n-core';
|
||||||
import {
|
import {
|
||||||
IDataObject,
|
IDataObject,
|
||||||
|
|
|
@ -115,6 +115,7 @@ export const dealFields: INodeProperties[] = [
|
||||||
displayName: 'Associated Company Names or IDs',
|
displayName: 'Associated Company Names or IDs',
|
||||||
name: 'associatedCompany',
|
name: 'associatedCompany',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getCompanies',
|
loadOptionsMethod: 'getCompanies',
|
||||||
},
|
},
|
||||||
|
@ -124,6 +125,7 @@ export const dealFields: INodeProperties[] = [
|
||||||
displayName: 'Associated Vid Names or IDs',
|
displayName: 'Associated Vid Names or IDs',
|
||||||
name: 'associatedVids',
|
name: 'associatedVids',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getContacts',
|
loadOptionsMethod: 'getContacts',
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
|
@ -91,7 +91,7 @@ export class Interval implements INodeType {
|
||||||
|
|
||||||
// Reference: https://nodejs.org/api/timers.html#timers_setinterval_callback_delay_args
|
// Reference: https://nodejs.org/api/timers.html#timers_setinterval_callback_delay_args
|
||||||
if (intervalValue > 2147483647) {
|
if (intervalValue > 2147483647) {
|
||||||
throw new Error('The interval value is too large.');
|
throw new NodeOperationError(this.getNode(), 'The interval value is too large.');
|
||||||
}
|
}
|
||||||
|
|
||||||
const intervalObj = setInterval(executeTrigger, intervalValue);
|
const intervalObj = setInterval(executeTrigger, intervalValue);
|
||||||
|
|
|
@ -168,6 +168,7 @@ export const issueFields: INodeProperties[] = [
|
||||||
displayName: 'Component Names or IDs',
|
displayName: 'Component Names or IDs',
|
||||||
name: 'componentIds',
|
name: 'componentIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getProjectComponents',
|
loadOptionsMethod: 'getProjectComponents',
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
|
@ -218,6 +219,7 @@ export const issueFields: INodeProperties[] = [
|
||||||
displayName: 'Label Names or IDs',
|
displayName: 'Label Names or IDs',
|
||||||
name: 'labels',
|
name: 'labels',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getLabels',
|
loadOptionsMethod: 'getLabels',
|
||||||
},
|
},
|
||||||
|
@ -384,6 +386,7 @@ export const issueFields: INodeProperties[] = [
|
||||||
displayName: 'Label Names or IDs',
|
displayName: 'Label Names or IDs',
|
||||||
name: 'labels',
|
name: 'labels',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getLabels',
|
loadOptionsMethod: 'getLabels',
|
||||||
},
|
},
|
||||||
|
|
|
@ -62,6 +62,7 @@ export const contactTagFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tagIds',
|
name: 'tagIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,8 @@ import {
|
||||||
ILoadOptionsFunctions,
|
ILoadOptionsFunctions,
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
INodeType,
|
INodeType,
|
||||||
INodeTypeDescription
|
INodeTypeDescription,
|
||||||
|
NodeOperationError
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -120,7 +121,7 @@ export class Kitemaker implements INodeType {
|
||||||
async getStatuses(this: ILoadOptionsFunctions) {
|
async getStatuses(this: ILoadOptionsFunctions) {
|
||||||
const spaceId = this.getNodeParameter('spaceId', 0) as string;
|
const spaceId = this.getNodeParameter('spaceId', 0) as string;
|
||||||
if (!spaceId.length) {
|
if (!spaceId.length) {
|
||||||
throw new Error('Please choose a space to set for the work item to create.');
|
throw new NodeOperationError(this.getNode(), 'Please choose a space to set for the work item to create.');
|
||||||
}
|
}
|
||||||
|
|
||||||
const responseData = await kitemakerRequest.call(this, { query: getStatuses });
|
const responseData = await kitemakerRequest.call(this, { query: getStatuses });
|
||||||
|
@ -246,7 +247,7 @@ export class Kitemaker implements INodeType {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!input.statusId.length) {
|
if (!input.statusId.length) {
|
||||||
throw new Error('Please enter a status to set for the work item to create.');
|
throw new NodeOperationError(this.getNode(), 'Please enter a status to set for the work item to create.');
|
||||||
}
|
}
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||||
|
@ -305,7 +306,7 @@ export class Kitemaker implements INodeType {
|
||||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||||
|
|
||||||
if (!Object.keys(updateFields).length) {
|
if (!Object.keys(updateFields).length) {
|
||||||
throw new Error('Please enter at least one field to update for the work item.');
|
throw new NodeOperationError(this.getNode(), 'Please enter at least one field to update for the work item.');
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(input, updateFields);
|
Object.assign(input, updateFields);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
INodeProperties,
|
INodeProperties,
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
|
|
|
@ -432,6 +432,7 @@ export const contactFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getTags',
|
loadOptionsMethod: 'getTags',
|
||||||
},
|
},
|
||||||
|
@ -922,6 +923,7 @@ export const contactFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/jsonParameters': [
|
'/jsonParameters': [
|
||||||
|
|
|
@ -86,6 +86,7 @@ export class MauticTrigger implements INodeType {
|
||||||
displayName: 'Event Names or IDs',
|
displayName: 'Event Names or IDs',
|
||||||
name: 'events',
|
name: 'events',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
required: true,
|
required: true,
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getEvents',
|
loadOptionsMethod: 'getEvents',
|
||||||
|
|
|
@ -175,6 +175,7 @@ export const accountFields: INodeProperties[] = [
|
||||||
displayName: 'Return Field Names or IDs',
|
displayName: 'Return Field Names or IDs',
|
||||||
name: 'returnFields',
|
name: 'returnFields',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getAccountFields',
|
loadOptionsMethod: 'getAccountFields',
|
||||||
},
|
},
|
||||||
|
@ -184,6 +185,7 @@ export const accountFields: INodeProperties[] = [
|
||||||
displayName: 'Expand Field Names or IDs',
|
displayName: 'Expand Field Names or IDs',
|
||||||
name: 'expandFields',
|
name: 'expandFields',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getExpandableAccountFields',
|
loadOptionsMethod: 'getExpandableAccountFields',
|
||||||
},
|
},
|
||||||
|
|
|
@ -174,6 +174,7 @@ export const draftFields: INodeProperties[] = [
|
||||||
displayName: 'Category Names or IDs',
|
displayName: 'Category Names or IDs',
|
||||||
name: 'categories',
|
name: 'categories',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getCategories',
|
loadOptionsMethod: 'getCategories',
|
||||||
},
|
},
|
||||||
|
|
|
@ -103,6 +103,7 @@ export const draftMessageSharedFields: INodeProperties[] = [
|
||||||
displayName: 'Category Names or IDs',
|
displayName: 'Category Names or IDs',
|
||||||
name: 'categories',
|
name: 'categories',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getCategories',
|
loadOptionsMethod: 'getCategories',
|
||||||
},
|
},
|
||||||
|
|
|
@ -493,6 +493,7 @@ export const messageFields: INodeProperties[] = [
|
||||||
displayName: 'Category Names or IDs',
|
displayName: 'Category Names or IDs',
|
||||||
name: 'categories',
|
name: 'categories',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getCategories',
|
loadOptionsMethod: 'getCategories',
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
blocks,
|
blocks,
|
||||||
} from './Blocks';
|
} from './Blocks';
|
||||||
|
|
||||||
export const blockOperations = [
|
export const blockOperations: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName: 'Operation',
|
displayName: 'Operation',
|
||||||
name: 'operation',
|
name: 'operation',
|
||||||
|
@ -34,7 +34,7 @@ export const blockOperations = [
|
||||||
],
|
],
|
||||||
default: 'append',
|
default: 'append',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
||||||
export const blockFields = [
|
export const blockFields = [
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import {
|
||||||
INodeProperties,
|
INodeProperties,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
export const databaseOperations = [
|
export const databaseOperations: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName: 'Operation',
|
displayName: 'Operation',
|
||||||
name: 'operation',
|
name: 'operation',
|
||||||
|
@ -66,9 +66,9 @@ export const databaseOperations = [
|
||||||
],
|
],
|
||||||
default: 'get',
|
default: 'get',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
||||||
export const databaseFields = [
|
export const databaseFields: INodeProperties[] = [
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* database:get */
|
/* database:get */
|
||||||
|
@ -301,4 +301,4 @@ export const databaseFields = [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
filters,
|
filters,
|
||||||
} from './Filters';
|
} from './Filters';
|
||||||
|
|
||||||
export const databasePageOperations = [
|
export const databasePageOperations: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName: 'Operation',
|
displayName: 'Operation',
|
||||||
name: 'operation',
|
name: 'operation',
|
||||||
|
@ -90,7 +90,7 @@ export const databasePageOperations = [
|
||||||
],
|
],
|
||||||
default: 'create',
|
default: 'create',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
||||||
export const databasePageFields = [
|
export const databasePageFields = [
|
||||||
|
|
||||||
|
@ -682,6 +682,7 @@ export const databasePageFields = [
|
||||||
displayName: 'Option Names or IDs',
|
displayName: 'Option Names or IDs',
|
||||||
name: 'multiSelectValue',
|
name: 'multiSelectValue',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getDatabaseOptionsFromPage',
|
loadOptionsMethod: 'getDatabaseOptionsFromPage',
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,6 +20,7 @@ import moment from 'moment';
|
||||||
|
|
||||||
export class NotionTrigger implements INodeType {
|
export class NotionTrigger implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
|
// eslint-disable-next-line n8n-nodes-base/node-class-description-display-name-unsuffixed-trigger-node
|
||||||
displayName: 'Notion Trigger (Beta)',
|
displayName: 'Notion Trigger (Beta)',
|
||||||
name: 'notionTrigger',
|
name: 'notionTrigger',
|
||||||
icon: 'file:notion.svg',
|
icon: 'file:notion.svg',
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
blocks,
|
blocks,
|
||||||
} from './Blocks';
|
} from './Blocks';
|
||||||
|
|
||||||
export const pageOperations = [
|
export const pageOperations: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName: 'Operation',
|
displayName: 'Operation',
|
||||||
name: 'operation',
|
name: 'operation',
|
||||||
|
@ -75,7 +75,7 @@ export const pageOperations = [
|
||||||
],
|
],
|
||||||
default: 'create',
|
default: 'create',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
||||||
export const pageFields = [
|
export const pageFields = [
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import {
|
||||||
INodeProperties,
|
INodeProperties,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
export const userOperations = [
|
export const userOperations: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
displayName: 'Operation',
|
displayName: 'Operation',
|
||||||
name: 'operation',
|
name: 'operation',
|
||||||
|
@ -29,9 +29,9 @@ export const userOperations = [
|
||||||
],
|
],
|
||||||
default: 'get',
|
default: 'get',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
||||||
export const userFields = [
|
export const userFields: INodeProperties[] = [
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* user:get */
|
/* user:get */
|
||||||
|
@ -97,4 +97,4 @@ export const userFields = [
|
||||||
default: 50,
|
default: 50,
|
||||||
description: 'Max number of results to return',
|
description: 'Max number of results to return',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
databaseFields,
|
databaseFields,
|
||||||
databaseOperations,
|
databaseOperations,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
databaseFields,
|
databaseFields,
|
||||||
databaseOperations,
|
databaseOperations,
|
||||||
|
|
|
@ -283,6 +283,7 @@ export const contactDescription: INodeProperties[] = [
|
||||||
displayName: 'Fields to Include',
|
displayName: 'Fields to Include',
|
||||||
name: 'fieldsList',
|
name: 'fieldsList',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getModelFields',
|
loadOptionsMethod: 'getModelFields',
|
||||||
|
|
|
@ -202,6 +202,7 @@ export const customResourceDescription: INodeProperties[] = [
|
||||||
displayName: 'Fields to Include',
|
displayName: 'Fields to Include',
|
||||||
name: 'fieldsList',
|
name: 'fieldsList',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getModelFields',
|
loadOptionsMethod: 'getModelFields',
|
||||||
|
|
|
@ -183,6 +183,7 @@ export const noteDescription: INodeProperties[] = [
|
||||||
displayName: 'Fields to Include',
|
displayName: 'Fields to Include',
|
||||||
name: 'fieldsList',
|
name: 'fieldsList',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getModelFields',
|
loadOptionsMethod: 'getModelFields',
|
||||||
|
|
|
@ -238,6 +238,7 @@ export const opportunityDescription: INodeProperties[] = [
|
||||||
displayName: 'Fields to Include',
|
displayName: 'Fields to Include',
|
||||||
name: 'fieldsList',
|
name: 'fieldsList',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getModelFields',
|
loadOptionsMethod: 'getModelFields',
|
||||||
|
|
|
@ -139,6 +139,7 @@ const vehicleLicensePlateField = {
|
||||||
const vehicleColorField = {
|
const vehicleColorField = {
|
||||||
displayName: 'Color',
|
displayName: 'Color',
|
||||||
name: 'color',
|
name: 'color',
|
||||||
|
// eslint-disable-next-line n8n-nodes-base/node-param-color-type-unused
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
default: '',
|
||||||
description: 'The vehicle\'s color',
|
description: 'The vehicle\'s color',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
createDeferredPromise,
|
createDeferredPromise,
|
||||||
IDataObject,
|
IDataObject,
|
||||||
|
@ -10,6 +10,7 @@ import {
|
||||||
ITriggerFunctions,
|
ITriggerFunctions,
|
||||||
ITriggerResponse,
|
ITriggerResponse,
|
||||||
LoggerProxy as Logger,
|
LoggerProxy as Logger,
|
||||||
|
NodeOperationError,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -156,7 +157,7 @@ export class RabbitMQTrigger implements INodeType {
|
||||||
let parallelMessages = (options.parallelMessages !== undefined && options.parallelMessages !== -1) ? parseInt(options.parallelMessages as string, 10) : -1;
|
let parallelMessages = (options.parallelMessages !== undefined && options.parallelMessages !== -1) ? parseInt(options.parallelMessages as string, 10) : -1;
|
||||||
|
|
||||||
if (parallelMessages === 0 || parallelMessages < -1) {
|
if (parallelMessages === 0 || parallelMessages < -1) {
|
||||||
throw new Error('Parallel message processing limit must be greater than zero (or -1 for no limit)');
|
throw new NodeOperationError(this.getNode(), 'Parallel message processing limit must be greater than zero (or -1 for no limit)');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getMode() === 'manual') {
|
if (this.getMode() === 'manual') {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
INodeType,
|
INodeType,
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
|
NodeOperationError,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -384,7 +385,7 @@ export class Ssh implements INodeType {
|
||||||
const item = items[i];
|
const item = items[i];
|
||||||
|
|
||||||
if (item.binary === undefined) {
|
if (item.binary === undefined) {
|
||||||
throw new Error('No binary data exists on item!');
|
throw new NodeOperationError(this.getNode(), 'No binary data exists on item!');
|
||||||
}
|
}
|
||||||
|
|
||||||
const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string;
|
const propertyNameUpload = this.getNodeParameter('binaryPropertyName', i) as string;
|
||||||
|
@ -392,7 +393,7 @@ export class Ssh implements INodeType {
|
||||||
const binaryData = item.binary[propertyNameUpload] as IBinaryData;
|
const binaryData = item.binary[propertyNameUpload] as IBinaryData;
|
||||||
|
|
||||||
if (item.binary[propertyNameUpload] === undefined) {
|
if (item.binary[propertyNameUpload] === undefined) {
|
||||||
throw new Error(`No binary data property "${propertyNameUpload}" does not exists on item!`);
|
throw new NodeOperationError(this.getNode(), `No binary data property "${propertyNameUpload}" does not exists on item!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, propertyNameUpload);
|
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, propertyNameUpload);
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {
|
||||||
INodePropertyOptions,
|
INodePropertyOptions,
|
||||||
INodeType,
|
INodeType,
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
|
NodeOperationError,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -267,7 +268,7 @@ export class Stripe implements INodeType {
|
||||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||||
|
|
||||||
if (isEmpty(updateFields)) {
|
if (isEmpty(updateFields)) {
|
||||||
throw new Error(`Please enter at least one field to update for the ${resource}.`);
|
throw new NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(body, adjustChargeFields(updateFields));
|
Object.assign(body, adjustChargeFields(updateFields));
|
||||||
|
@ -386,7 +387,7 @@ export class Stripe implements INodeType {
|
||||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||||
|
|
||||||
if (isEmpty(updateFields)) {
|
if (isEmpty(updateFields)) {
|
||||||
throw new Error(`Please enter at least one field to update for the ${resource}.`);
|
throw new NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(body, adjustCustomerFields(updateFields));
|
Object.assign(body, adjustCustomerFields(updateFields));
|
||||||
|
@ -470,7 +471,7 @@ export class Stripe implements INodeType {
|
||||||
const body = {} as IDataObject;
|
const body = {} as IDataObject;
|
||||||
|
|
||||||
if (type !== 'cardToken') {
|
if (type !== 'cardToken') {
|
||||||
throw new Error('Only card token creation implemented.');
|
throw new NodeOperationError(this.getNode(), 'Only card token creation implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
body.card = {
|
body.card = {
|
||||||
|
|
|
@ -254,6 +254,7 @@ export class SurveyMonkeyTrigger implements INodeType {
|
||||||
displayName: 'Survey Names or IDs',
|
displayName: 'Survey Names or IDs',
|
||||||
name: 'surveyIds',
|
name: 'surveyIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
objectType: [
|
objectType: [
|
||||||
|
@ -295,6 +296,7 @@ export class SurveyMonkeyTrigger implements INodeType {
|
||||||
displayName: 'Collector Names or IDs',
|
displayName: 'Collector Names or IDs',
|
||||||
name: 'collectorIds',
|
name: 'collectorIds',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
objectType: [
|
objectType: [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
|
@ -149,6 +149,7 @@ export const epicFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
@ -416,6 +417,7 @@ export const epicFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
|
|
@ -195,6 +195,7 @@ export const issueFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
@ -471,6 +472,7 @@ export const issueFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
@ -648,6 +650,7 @@ export const issueFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
|
|
@ -168,6 +168,7 @@ export const taskFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
@ -413,6 +414,7 @@ export const taskFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
@ -587,6 +589,7 @@ export const taskFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
|
|
@ -198,6 +198,7 @@ export const userStoryFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
@ -430,6 +431,7 @@ export const userStoryFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
@ -598,6 +600,7 @@ export const userStoryFields: INodeProperties[] = [
|
||||||
displayName: 'Tag Names or IDs',
|
displayName: 'Tag Names or IDs',
|
||||||
name: 'tags',
|
name: 'tags',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'projectId',
|
'projectId',
|
||||||
|
|
|
@ -322,6 +322,7 @@ export const observableFields: INodeProperties[] = [
|
||||||
displayName: 'Analyzer Names or IDs',
|
displayName: 'Analyzer Names or IDs',
|
||||||
name: 'analyzers',
|
name: 'analyzers',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
required: true,
|
required: true,
|
||||||
default: [],
|
default: [],
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
|
|
|
@ -561,6 +561,7 @@ export class Todoist implements INodeType {
|
||||||
displayName: 'Label Names or IDs',
|
displayName: 'Label Names or IDs',
|
||||||
name: 'labels',
|
name: 'labels',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getLabels',
|
loadOptionsMethod: 'getLabels',
|
||||||
},
|
},
|
||||||
|
|
|
@ -199,7 +199,7 @@ export const commentFields: INodeProperties[] = [
|
||||||
description: 'Name of the property that holds the binary data. Multiple can be defined separated by comma.',
|
description: 'Name of the property that holds the binary data. Multiple can be defined separated by comma.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Direct Mentions Name or ID',
|
displayName: 'Direct Mention Names or IDs',
|
||||||
name: 'direct_mentions',
|
name: 'direct_mentions',
|
||||||
type: 'multiOptions',
|
type: 'multiOptions',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
|
|
|
@ -274,7 +274,7 @@ export class Twist implements INodeType {
|
||||||
const binaryData = item[binaryProperty] as IBinaryData;
|
const binaryData = item[binaryProperty] as IBinaryData;
|
||||||
|
|
||||||
if (binaryData === undefined) {
|
if (binaryData === undefined) {
|
||||||
throw new Error(`No binary data property "${binaryProperty}" does not exists on item!`);
|
throw new NodeOperationError(this.getNode(), `No binary data property "${binaryProperty}" does not exists on item!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||||
|
@ -378,7 +378,7 @@ export class Twist implements INodeType {
|
||||||
const binaryData = item[binaryProperty] as IBinaryData;
|
const binaryData = item[binaryProperty] as IBinaryData;
|
||||||
|
|
||||||
if (binaryData === undefined) {
|
if (binaryData === undefined) {
|
||||||
throw new Error(`No binary data property "${binaryProperty}" does not exists on item!`);
|
throw new NodeOperationError(this.getNode(), `No binary data property "${binaryProperty}" does not exists on item!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||||
|
@ -549,7 +549,7 @@ export class Twist implements INodeType {
|
||||||
const binaryData = item[binaryProperty] as IBinaryData;
|
const binaryData = item[binaryProperty] as IBinaryData;
|
||||||
|
|
||||||
if (binaryData === undefined) {
|
if (binaryData === undefined) {
|
||||||
throw new Error(`No binary data property "${binaryProperty}" does not exists on item!`);
|
throw new NodeOperationError(this.getNode(), `No binary data property "${binaryProperty}" does not exists on item!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||||
|
@ -623,7 +623,7 @@ export class Twist implements INodeType {
|
||||||
const binaryData = item[binaryProperty] as IBinaryData;
|
const binaryData = item[binaryProperty] as IBinaryData;
|
||||||
|
|
||||||
if (binaryData === undefined) {
|
if (binaryData === undefined) {
|
||||||
throw new Error(`No binary data property "${binaryProperty}" does not exists on item!`);
|
throw new NodeOperationError(this.getNode(), `No binary data property "${binaryProperty}" does not exists on item!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||||
|
@ -726,7 +726,7 @@ export class Twist implements INodeType {
|
||||||
const binaryData = item[binaryProperty] as IBinaryData;
|
const binaryData = item[binaryProperty] as IBinaryData;
|
||||||
|
|
||||||
if (binaryData === undefined) {
|
if (binaryData === undefined) {
|
||||||
throw new Error(`No binary data property "${binaryProperty}" does not exists on item!`);
|
throw new NodeOperationError(this.getNode(), `No binary data property "${binaryProperty}" does not exists on item!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* eslint-disable n8n-nodes-base/filesystem-wrong-node-filename */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import {
|
import {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
|
@ -19,10 +19,8 @@
|
||||||
"build": "tsc && gulp build:icons && gulp build:translations",
|
"build": "tsc && gulp build:icons && gulp build:translations",
|
||||||
"build:translations": "gulp build:translations",
|
"build:translations": "gulp build:translations",
|
||||||
"format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/nodes-base/**/**.ts --write",
|
"format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/nodes-base/**/**.ts --write",
|
||||||
"lint": "tslint -p tsconfig.json -c tslint.json",
|
"lint": "tslint -p tsconfig.json -c tslint.json; cd ../../ && node_modules/eslint/bin/eslint.js packages/nodes-base/nodes packages/nodes-base/credentials",
|
||||||
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json",
|
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json; cd ../.. && node_modules/eslint/bin/eslint.js packages/nodes-base/nodes packages/nodes-base/credentials --fix",
|
||||||
"lintfix:plugin": "cd ../.. && node_modules/eslint/bin/eslint.js packages/nodes-base/nodes --fix",
|
|
||||||
"nodelinter": "nodelinter",
|
|
||||||
"watch": "tsc --watch",
|
"watch": "tsc --watch",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
|
@ -715,11 +713,10 @@
|
||||||
"@types/tmp": "^0.2.0",
|
"@types/tmp": "^0.2.0",
|
||||||
"@types/uuid": "^8.3.2",
|
"@types/uuid": "^8.3.2",
|
||||||
"@types/xml2js": "^0.4.3",
|
"@types/xml2js": "^0.4.3",
|
||||||
"eslint-plugin-n8n-nodes-base": "^1.0.38",
|
"eslint-plugin-n8n-nodes-base": "^1.2.8",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"jest": "^27.4.7",
|
"jest": "^27.4.7",
|
||||||
"n8n-workflow": "~0.106.0",
|
"n8n-workflow": "~0.106.0",
|
||||||
"nodelinter": "^0.1.9",
|
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
"tslint": "^6.1.2",
|
"tslint": "^6.1.2",
|
||||||
"typescript": "~4.6.0"
|
"typescript": "~4.6.0"
|
||||||
|
|
Loading…
Reference in a new issue