diff --git a/packages/nodes-base/nodes/Emelia/CampaignDescription.ts b/packages/nodes-base/nodes/Emelia/CampaignDescription.ts index aeaee98d3a185..ba8bf7b486e9d 100644 --- a/packages/nodes-base/nodes/Emelia/CampaignDescription.ts +++ b/packages/nodes-base/nodes/Emelia/CampaignDescription.ts @@ -59,7 +59,6 @@ export const campaignFields: INodeProperties[] = [ name: 'campaignId', type: 'options', typeOptions: { - // nodelinter-ignore-next-line loadOptionsMethod: 'getCampaigns', }, default: [], @@ -154,7 +153,7 @@ export const campaignFields: INodeProperties[] = [ { displayName: 'Last Contacted', name: 'lastContacted', - type: 'string', + type: 'dateTime', default: '', description: 'Last contacted date of the contact to add', }, @@ -168,14 +167,14 @@ export const campaignFields: INodeProperties[] = [ { displayName: 'Last Open', name: 'lastOpen', - type: 'string', + type: 'dateTime', default: '', description: 'Last opened date of the contact to add', }, { displayName: 'Last Replied', name: 'lastReplied', - type: 'string', + type: 'dateTime', default: '', description: 'Last replied date of the contact to add', }, @@ -335,10 +334,13 @@ export const campaignFields: INodeProperties[] = [ { displayName: 'Campaign ID', name: 'campaignId', - type: 'string', + type: 'options', default: '', required: true, description: 'The ID of the campaign to duplicate', + typeOptions: { + loadOptionsMethod: 'getCampaigns', + }, displayOptions: { show: { resource: [ @@ -386,11 +388,11 @@ export const campaignFields: INodeProperties[] = [ }, options: [ { - displayName: 'Copy Global Settings', - name: 'copySettings', + displayName: 'Copy Contacts', + name: 'copyContacts', type: 'boolean', - default: true, - description: 'Whether to copy all the general settings from the original campaign', + default: false, + description: 'Whether to copy all the contacts from the original campaign', }, { displayName: 'Copy Email Provider', @@ -407,11 +409,11 @@ export const campaignFields: INodeProperties[] = [ description: 'Whether to copy all the steps of the email sequence from the original campaign', }, { - displayName: 'Copy Contacts', - name: 'copyContacts', + displayName: 'Copy Global Settings', + name: 'copySettings', type: 'boolean', - default: false, - description: 'Whether to copy all the contacts from the original campaign', + default: true, + description: 'Whether to copy all the general settings from the original campaign', }, ], }, diff --git a/packages/nodes-base/nodes/Emelia/ContactListDescription.ts b/packages/nodes-base/nodes/Emelia/ContactListDescription.ts index f4e0663bdb8e9..d74ed38f18f7b 100644 --- a/packages/nodes-base/nodes/Emelia/ContactListDescription.ts +++ b/packages/nodes-base/nodes/Emelia/ContactListDescription.ts @@ -39,7 +39,6 @@ export const contactListFields: INodeProperties[] = [ name: 'contactListId', type: 'options', typeOptions: { - // nodelinter-ignore-next-line loadOptionsMethod: 'getContactLists', }, default: [], diff --git a/packages/nodes-base/nodes/Emelia/Emelia.node.ts b/packages/nodes-base/nodes/Emelia/Emelia.node.ts index 91d5304c87752..25c51ed095e64 100644 --- a/packages/nodes-base/nodes/Emelia/Emelia.node.ts +++ b/packages/nodes-base/nodes/Emelia/Emelia.node.ts @@ -314,7 +314,7 @@ export class Emelia implements INodeType { copyProvider: true, ...options, }; - await emeliaGraphqlRequest.call(this, { + const { data: { duplicateCampaign } } = await emeliaGraphqlRequest.call(this, { query: ` mutation duplicateCampaign( $fromId: ID! @@ -337,8 +337,7 @@ export class Emelia implements INodeType { variables, }); - returnData.push({ success: true }); - + returnData.push({ duplicateCampaign }); } } else if (resource === 'contactList') {