🎉 node setup

This commit is contained in:
Ricardo Espinoza 2019-11-15 15:10:51 -05:00
parent 6a96349ed6
commit 8d886e3766
4 changed files with 81 additions and 2 deletions

View file

@ -0,0 +1,18 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class IntercomApi implements ICredentialType {
name = 'intercomApi';
displayName = 'Intercom API';
properties = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string' as NodePropertyTypes,
default: '',
},
];
}

View file

@ -0,0 +1,59 @@
import {
IExecuteSingleFunctions,
} from 'n8n-core';
import {
IDataObject,
INodeTypeDescription,
INodeExecutionData,
INodeType,
ILoadOptionsFunctions,
INodePropertyOptions,
} from 'n8n-workflow';
export class Intercom implements INodeType {
description: INodeTypeDescription = {
displayName: 'Intercom',
name: 'intercom',
icon: 'file:intercom.png',
group: ['output'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Consume intercom API',
defaults: {
name: 'Intercom',
color: '#c02428',
},
inputs: ['main'],
outputs: ['main'],
credentials: [
{
name: 'intercomApi',
required: true,
}
],
properties: [
{
displayName: 'Resource',
name: 'resource',
type: 'options',
options: [
{
name: 'Lead',
value: 'lead',
description: '',
},
],
default: '',
description: 'Resource to consume.',
},
],
};
async executeSingle(this: IExecuteSingleFunctions): Promise<INodeExecutionData> {
return {
json: {},
};
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -39,7 +39,8 @@
"dist/credentials/GoogleApi.credentials.js",
"dist/credentials/HttpBasicAuth.credentials.js",
"dist/credentials/HttpDigestAuth.credentials.js",
"dist/credentials/HttpHeaderAuth.credentials.js",
"dist/credentials/HttpHeaderAuth.credentials.js",
"dist/credentials/IntercomApi.credentials.js",
"dist/credentials/Imap.credentials.js",
"dist/credentials/LinkFishApi.credentials.js",
"dist/credentials/MailgunApi.credentials.js",
@ -95,7 +96,8 @@
"dist/nodes/GraphQL/GraphQL.node.js",
"dist/nodes/HttpRequest.node.js",
"dist/nodes/If.node.js",
"dist/nodes/Interval.node.js",
"dist/nodes/Interval.node.js",
"dist/nodes/Intercom/Intercom.node.js",
"dist/nodes/LinkFish/LinkFish.node.js",
"dist/nodes/Mailgun/Mailgun.node.js",
"dist/nodes/Mandrill/Mandrill.node.js",