From ced0bd235a7b091fd1375ba1ef24dcfea5e5375a Mon Sep 17 00:00:00 2001 From: Bikash Mishra Date: Tue, 19 Mar 2024 10:31:56 +0530 Subject: [PATCH] added a node to get all the subscribers by list id --- nodes/Listmonk/businessOperations/subscribers.ts | 14 ++++++++++++++ nodes/Listmonk/options.ts | 13 +++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/nodes/Listmonk/businessOperations/subscribers.ts b/nodes/Listmonk/businessOperations/subscribers.ts index e0e9d6b..6bd5fce 100644 --- a/nodes/Listmonk/businessOperations/subscribers.ts +++ b/nodes/Listmonk/businessOperations/subscribers.ts @@ -62,6 +62,20 @@ export const subscriberOperations: INodeProperties[] = [ }, }, }, + { + name: 'Get by List ID', + value: 'getByListId', + action: 'Get by list id', + routing: { + request: { + method: 'GET', + url: '/subscribers', + qs: { + list_id: '={{$parameter.listId}}', + }, + }, + }, + }, { name: 'Get Subscriber by ID', value: 'geSubscriberById', diff --git a/nodes/Listmonk/options.ts b/nodes/Listmonk/options.ts index 285eaba..1ca5c5a 100644 --- a/nodes/Listmonk/options.ts +++ b/nodes/Listmonk/options.ts @@ -327,6 +327,19 @@ export const listmonkOptions: INodeProperties[] = [ }, }, }, + { + displayName: 'List ID', + description: 'Get all the subscribers by list id.', + required: true, + name: 'listId', + type: 'number', + default: '', + displayOptions: { + show: { + operation: ['getByListId'], + }, + }, + }, { displayName: 'Preconfirm Subscriptions', name: 'preconfirmSubscriptions', diff --git a/package-lock.json b/package-lock.json index 1507781..fa26bb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "n8n-nodes-listmonk", - "version": "1.0.4", + "version": "1.0.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "n8n-nodes-listmonk", - "version": "1.0.4", + "version": "1.0.5", "license": "MIT", "devDependencies": { "@types/express": "^4.17.6", diff --git a/package.json b/package.json index 95a5e79..3eb10bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "n8n-nodes-listmonk", - "version": "1.0.4", + "version": "1.0.5", "description": "A n8n node to interact with Listmonk app", "keywords": [ "n8n-community-node-package",