Improvements

This commit is contained in:
ricardo 2020-08-10 09:41:10 -04:00
parent 833001a9e4
commit b3a8587106
4 changed files with 40 additions and 38 deletions

View file

@ -6,7 +6,7 @@ import {
export class ConvertKitApi implements ICredentialType { export class ConvertKitApi implements ICredentialType {
name = 'convertKitApi'; name = 'convertKitApi';
displayName = 'ConvertKit Api'; displayName = 'ConvertKit API';
properties = [ properties = [
{ {
displayName: 'API Secret', displayName: 'API Secret',

View file

@ -297,6 +297,8 @@ export class ConvertKitTrigger implements INodeType {
}, },
}; };
console.log(event);
if (event === 'subscriber.form_subscribe') { if (event === 'subscriber.form_subscribe') {
//@ts-ignore //@ts-ignore
body.event['form_id'] = this.getNodeParameter('formId', 0); body.event['form_id'] = this.getNodeParameter('formId', 0);
@ -317,7 +319,7 @@ export class ConvertKitTrigger implements INodeType {
body.event['product_id'] = this.getNodeParameter('productId', 0); body.event['product_id'] = this.getNodeParameter('productId', 0);
} }
if (event === 'subscriber.tag_add' || event === 'subscriber.tag_remove"') { if (event === 'subscriber.tag_add' || event === 'subscriber.tag_remove') {
//@ts-ignore //@ts-ignore
body.event['tag_id'] = this.getNodeParameter('tagId', 0); body.event['tag_id'] = this.getNodeParameter('tagId', 0);
} }

View file

@ -37,24 +37,6 @@ export const formOperations = [
] as INodeProperties[]; ] as INodeProperties[];
export const formFields = [ export const formFields = [
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'form',
],
operation: [
'addSubscriber',
],
},
},
default: '',
description: `The subscriber's email address.`,
},
{ {
displayName: 'Form ID', displayName: 'Form ID',
name: 'id', name: 'id',
@ -77,6 +59,24 @@ export const formFields = [
default: '', default: '',
description: 'Form ID.', description: 'Form ID.',
}, },
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'form',
],
operation: [
'addSubscriber',
],
},
},
default: '',
description: `The subscriber's email address.`,
},
{ {
displayName: 'Additional Fields', displayName: 'Additional Fields',
name: 'additionalFields', name: 'additionalFields',

View file

@ -37,24 +37,6 @@ export const sequenceOperations = [
] as INodeProperties[]; ] as INodeProperties[];
export const sequenceFields = [ export const sequenceFields = [
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'sequence',
],
operation: [
'addSubscriber',
],
},
},
default: '',
description: `The subscriber's email address.`,
},
{ {
displayName: 'Sequence ID', displayName: 'Sequence ID',
name: 'id', name: 'id',
@ -77,6 +59,24 @@ export const sequenceFields = [
default: '', default: '',
description: 'Sequence ID.', description: 'Sequence ID.',
}, },
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'sequence',
],
operation: [
'addSubscriber',
],
},
},
default: '',
description: `The subscriber's email address.`,
},
{ {
displayName: 'Return All', displayName: 'Return All',
name: 'returnAll', name: 'returnAll',