n8n-nodes-coresignal-api 1.0.2 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,14 +10,14 @@ class Coresignal {
10
10
  icon: 'file:logo.svg',
11
11
  group: ['transform'],
12
12
  version: 1,
13
- subtitle: '={{$parameter["action"] + " - " + $parameter["category"] + " (" + $parameter["dataset"] + ")"}}',
13
+ subtitle: '={{$parameter["operation"] + " - " + $parameter["resource"]}}',
14
14
  description: 'Interact with Coresignal API for company, employee, job, and post data',
15
15
  documentationUrl: 'https://docs.coresignal.com/?utm_source=n8n&utm_medium=referral',
16
16
  defaults: {
17
17
  name: 'Coresignal',
18
18
  },
19
- inputs: ['main'],
20
- outputs: ['main'],
19
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
20
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
21
21
  credentials: [
22
22
  {
23
23
  name: 'coresignalApi',
@@ -25,162 +25,162 @@ class Coresignal {
25
25
  },
26
26
  ],
27
27
  properties: [
28
- // Category Selection
28
+ // Resource Selection
29
29
  {
30
- displayName: 'Category',
31
- name: 'category',
30
+ displayName: 'Resource',
31
+ name: 'resource',
32
32
  type: 'options',
33
33
  noDataExpression: true,
34
34
  options: [
35
35
  {
36
- name: 'Employee Data',
37
- value: 'employee',
38
- description: 'Access employee data and profiles',
39
- },
40
- {
41
- name: 'Company Data',
36
+ name: 'Company',
42
37
  value: 'company',
43
38
  description: 'Access company data and profiles',
44
39
  },
45
40
  {
46
- name: 'Job Data',
47
- value: 'job',
48
- description: 'Access jobs data',
41
+ name: 'Employee',
42
+ value: 'employee',
43
+ description: 'Access employee data and profiles',
49
44
  },
50
45
  {
51
- name: 'Employee Posts',
46
+ name: 'Employee Post',
52
47
  value: 'post',
53
48
  description: 'Access employee posts data',
54
49
  },
50
+ {
51
+ name: 'Job',
52
+ value: 'job',
53
+ description: 'Access jobs data',
54
+ },
55
55
  ],
56
56
  default: 'employee',
57
57
  },
58
- // ============ METHOD SELECTIONS ============
59
- // Method - Company
58
+ // ============ OPERATION SELECTIONS ============
59
+ // Operation - Company
60
60
  {
61
- displayName: 'Action',
62
- name: 'action',
61
+ displayName: 'Operation',
62
+ name: 'operation',
63
63
  type: 'options',
64
64
  noDataExpression: true,
65
65
  displayOptions: {
66
66
  show: {
67
- category: ['company'],
67
+ resource: ['company'],
68
68
  },
69
69
  },
70
70
  options: [
71
71
  {
72
- name: 'Collect by ID',
73
- value: 'collect_by_id',
74
- description: 'Retrieve a full company profile using a company ID',
75
- action: 'Retrieve a full company profile using a company ID',
72
+ name: 'Enrich by Website',
73
+ value: 'enrich',
74
+ description: 'Enrich company data using a website URL',
75
+ action: 'Enrich company by website URL',
76
76
  },
77
77
  {
78
- name: 'Collect by Slug',
79
- value: 'collect_by_slug',
80
- description: 'Retrieve a full company profile using a URL slug',
81
- action: 'Retrieve a full company profile using a URL slug',
78
+ name: 'Get by ID',
79
+ value: 'get_by_id',
80
+ description: 'Retrieve a full company profile using a company ID',
81
+ action: 'Get company by ID',
82
82
  },
83
83
  {
84
- name: 'Enrich by Website',
85
- value: 'enrich',
86
- description: 'Enrich company data using a website URL',
87
- action: 'Enrich company data using a website URL',
84
+ name: 'Get by Slug',
85
+ value: 'get_by_slug',
86
+ description: 'Retrieve a full company profile using a URL slug',
87
+ action: 'Get company by URL slug',
88
88
  },
89
89
  {
90
90
  name: 'Search with Elasticsearch DSL',
91
91
  value: 'search_es_dsl',
92
92
  description: 'Search companies using an Elasticsearch DSL query',
93
- action: 'Search companies using an elasticsearch dsl query',
93
+ action: 'Search companies using elasticsearch DSL',
94
94
  },
95
95
  ],
96
- default: 'collect_by_id',
96
+ default: 'get_by_id',
97
97
  },
98
- // Method - Employee
98
+ // Operation - Employee
99
99
  {
100
- displayName: 'Action',
101
- name: 'action',
100
+ displayName: 'Operation',
101
+ name: 'operation',
102
102
  type: 'options',
103
103
  noDataExpression: true,
104
104
  displayOptions: {
105
105
  show: {
106
- category: ['employee'],
106
+ resource: ['employee'],
107
107
  },
108
108
  },
109
109
  options: [
110
110
  {
111
- name: 'Collect by ID',
112
- value: 'collect_by_id',
111
+ name: 'Get by ID',
112
+ value: 'get_by_id',
113
113
  description: 'Retrieve a full employee profile using an employee ID',
114
- action: 'Retrieve a full employee profile using an employee ID',
114
+ action: 'Get employee by ID',
115
115
  },
116
116
  {
117
- name: 'Collect by Slug',
118
- value: 'collect_by_slug',
117
+ name: 'Get by Slug',
118
+ value: 'get_by_slug',
119
119
  description: 'Retrieve a full employee profile using a URL slug',
120
- action: 'Retrieve a full employee profile using a URL slug',
120
+ action: 'Get employee by URL slug',
121
121
  },
122
122
  {
123
123
  name: 'Search with Elasticsearch DSL',
124
124
  value: 'search_es_dsl',
125
125
  description: 'Search employees using an Elasticsearch DSL query',
126
- action: 'Search employees using an elasticsearch dsl query',
126
+ action: 'Search employees using elasticsearch DSL',
127
127
  },
128
128
  ],
129
- default: 'collect_by_id',
129
+ default: 'get_by_id',
130
130
  },
131
- // Method - Jobs
131
+ // Operation - Jobs
132
132
  {
133
- displayName: 'Action',
134
- name: 'action',
133
+ displayName: 'Operation',
134
+ name: 'operation',
135
135
  type: 'options',
136
136
  noDataExpression: true,
137
137
  displayOptions: {
138
138
  show: {
139
- category: ['job'],
139
+ resource: ['job'],
140
140
  },
141
141
  },
142
142
  options: [
143
143
  {
144
- name: 'Collect by ID',
145
- value: 'collect_by_id',
144
+ name: 'Get by ID',
145
+ value: 'get_by_id',
146
146
  description: 'Retrieve a full job posting using a job ID',
147
- action: 'Retrieve a full job posting using a job ID',
147
+ action: 'Get job by ID',
148
148
  },
149
149
  {
150
150
  name: 'Search with Elasticsearch DSL',
151
151
  value: 'search_es_dsl',
152
152
  description: 'Search jobs using an Elasticsearch DSL query',
153
- action: 'Search jobs using an elasticsearch dsl query',
153
+ action: 'Search jobs using elasticsearch DSL',
154
154
  },
155
155
  ],
156
- default: 'collect_by_id',
156
+ default: 'get_by_id',
157
157
  },
158
- // Method - Posts
158
+ // Operation - Posts
159
159
  {
160
- displayName: 'Action',
161
- name: 'action',
160
+ displayName: 'Operation',
161
+ name: 'operation',
162
162
  type: 'options',
163
163
  noDataExpression: true,
164
164
  displayOptions: {
165
165
  show: {
166
- category: ['post'],
166
+ resource: ['post'],
167
167
  },
168
168
  },
169
169
  options: [
170
170
  {
171
- name: 'Collect by ID',
172
- value: 'collect_by_id',
171
+ name: 'Get by ID',
172
+ value: 'get_by_id',
173
173
  description: 'Retrieve a full employee post using a post ID',
174
- action: 'Retrieve a full employee post using a post ID',
174
+ action: 'Get employee post by ID',
175
175
  },
176
176
  {
177
177
  name: 'Search with Elasticsearch DSL',
178
178
  value: 'search_es_dsl',
179
179
  description: 'Search employee posts using an Elasticsearch DSL query',
180
- action: 'Search employee posts using an elasticsearch dsl query',
180
+ action: 'Search employee posts using elasticsearch DSL',
181
181
  },
182
182
  ],
183
- default: 'collect_by_id',
183
+ default: 'get_by_id',
184
184
  },
185
185
  // ============ INPUT DATA ============
186
186
  // ID Parameter - Company
@@ -191,8 +191,8 @@ class Coresignal {
191
191
  required: true,
192
192
  displayOptions: {
193
193
  show: {
194
- category: ['company'],
195
- action: ['collect_by_id'],
194
+ resource: ['company'],
195
+ operation: ['get_by_id'],
196
196
  },
197
197
  },
198
198
  default: '',
@@ -206,8 +206,8 @@ class Coresignal {
206
206
  required: true,
207
207
  displayOptions: {
208
208
  show: {
209
- category: ['employee'],
210
- action: ['collect_by_id'],
209
+ resource: ['employee'],
210
+ operation: ['get_by_id'],
211
211
  },
212
212
  },
213
213
  default: '',
@@ -221,8 +221,8 @@ class Coresignal {
221
221
  required: true,
222
222
  displayOptions: {
223
223
  show: {
224
- category: ['job'],
225
- action: ['collect_by_id'],
224
+ resource: ['job'],
225
+ operation: ['get_by_id'],
226
226
  },
227
227
  },
228
228
  default: '',
@@ -236,8 +236,8 @@ class Coresignal {
236
236
  required: true,
237
237
  displayOptions: {
238
238
  show: {
239
- category: ['post'],
240
- action: ['collect_by_id'],
239
+ resource: ['post'],
240
+ operation: ['get_by_id'],
241
241
  },
242
242
  },
243
243
  default: '',
@@ -251,12 +251,12 @@ class Coresignal {
251
251
  required: true,
252
252
  displayOptions: {
253
253
  show: {
254
- category: ['employee'],
255
- action: ['collect_by_slug'],
254
+ resource: ['employee'],
255
+ operation: ['get_by_slug'],
256
256
  },
257
257
  },
258
258
  default: '',
259
- placeholder: 'e.g., john-smith',
259
+ placeholder: 'e.g. john-smith',
260
260
  description: 'The slug to retrieve data for',
261
261
  },
262
262
  // Shorthand Name Parameter - Company
@@ -267,12 +267,12 @@ class Coresignal {
267
267
  required: true,
268
268
  displayOptions: {
269
269
  show: {
270
- category: ['company'],
271
- action: ['collect_by_slug'],
270
+ resource: ['company'],
271
+ operation: ['get_by_slug'],
272
272
  },
273
273
  },
274
274
  default: '',
275
- placeholder: 'e.g., microsoft',
275
+ placeholder: 'e.g. microsoft',
276
276
  description: 'The slug to retrieve data for',
277
277
  },
278
278
  // Website Parameter - Enrich
@@ -283,12 +283,12 @@ class Coresignal {
283
283
  required: true,
284
284
  displayOptions: {
285
285
  show: {
286
- category: ['company'],
287
- action: ['enrich'],
286
+ resource: ['company'],
287
+ operation: ['enrich'],
288
288
  },
289
289
  },
290
290
  default: '',
291
- placeholder: 'e.g., https://example.com',
291
+ placeholder: 'e.g. https://example.com',
292
292
  description: 'The company website URL to enrich data for',
293
293
  },
294
294
  // Fields Parameter - Employee
@@ -298,13 +298,12 @@ class Coresignal {
298
298
  type: 'string',
299
299
  displayOptions: {
300
300
  show: {
301
- category: ['employee'],
302
- action: ['collect_by_id', 'collect_by_slug'],
301
+ resource: ['employee'],
302
+ operation: ['get_by_id', 'get_by_slug'],
303
303
  },
304
304
  },
305
305
  default: '',
306
- // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
307
- placeholder: 'e.g., id,full_name,headline',
306
+ placeholder: 'e.g. full_name,headline',
308
307
  description: 'Comma-separated list of fields to return (leave empty for all fields)',
309
308
  },
310
309
  // Fields Parameter - Company
@@ -314,13 +313,12 @@ class Coresignal {
314
313
  type: 'string',
315
314
  displayOptions: {
316
315
  show: {
317
- category: ['company'],
318
- action: ['collect_by_id', 'collect_by_slug', 'enrich'],
316
+ resource: ['company'],
317
+ operation: ['get_by_id', 'get_by_slug', 'enrich'],
319
318
  },
320
319
  },
321
320
  default: '',
322
- // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
323
- placeholder: 'e.g., id,company_name,website',
321
+ placeholder: 'e.g. company_name,website',
324
322
  description: 'Comma-separated list of fields to return (leave empty for all fields)',
325
323
  },
326
324
  // Fields Parameter - Jobs
@@ -330,13 +328,12 @@ class Coresignal {
330
328
  type: 'string',
331
329
  displayOptions: {
332
330
  show: {
333
- category: ['job'],
334
- action: ['collect_by_id'],
331
+ resource: ['job'],
332
+ operation: ['get_by_id'],
335
333
  },
336
334
  },
337
335
  default: '',
338
- // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
339
- placeholder: 'e.g., id,title,company_name',
336
+ placeholder: 'e.g. title,company_name',
340
337
  description: 'Comma-separated list of fields to return (leave empty for all fields)',
341
338
  },
342
339
  // Fields Parameter - Posts
@@ -346,13 +343,12 @@ class Coresignal {
346
343
  type: 'string',
347
344
  displayOptions: {
348
345
  show: {
349
- category: ['post'],
350
- action: ['collect_by_id'],
346
+ resource: ['post'],
347
+ operation: ['get_by_id'],
351
348
  },
352
349
  },
353
350
  default: '',
354
- // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
355
- placeholder: 'e.g., id,url,author_name',
351
+ placeholder: 'e.g. url,author_name',
356
352
  description: 'Comma-separated list of fields to return (leave empty for all fields)',
357
353
  },
358
354
  // Elasticsearch DSL Query - Employee
@@ -363,8 +359,8 @@ class Coresignal {
363
359
  required: true,
364
360
  displayOptions: {
365
361
  show: {
366
- category: ['employee'],
367
- action: ['search_es_dsl'],
362
+ resource: ['employee'],
363
+ operation: ['search_es_dsl'],
368
364
  },
369
365
  },
370
366
  default: '{"query": {"match_all": {}}}',
@@ -379,8 +375,8 @@ class Coresignal {
379
375
  required: true,
380
376
  displayOptions: {
381
377
  show: {
382
- category: ['company'],
383
- action: ['search_es_dsl'],
378
+ resource: ['company'],
379
+ operation: ['search_es_dsl'],
384
380
  },
385
381
  },
386
382
  default: '{"query": {"match_all": {}}}',
@@ -395,8 +391,8 @@ class Coresignal {
395
391
  required: true,
396
392
  displayOptions: {
397
393
  show: {
398
- category: ['job'],
399
- action: ['search_es_dsl'],
394
+ resource: ['job'],
395
+ operation: ['search_es_dsl'],
400
396
  },
401
397
  },
402
398
  default: '{"query": {"match_all": {}}}',
@@ -411,8 +407,8 @@ class Coresignal {
411
407
  required: true,
412
408
  displayOptions: {
413
409
  show: {
414
- category: ['post'],
415
- action: ['search_es_dsl'],
410
+ resource: ['post'],
411
+ operation: ['search_es_dsl'],
416
412
  },
417
413
  },
418
414
  default: '{"query": {"match_all": {}}}',
@@ -426,8 +422,8 @@ class Coresignal {
426
422
  default: false,
427
423
  displayOptions: {
428
424
  show: {
429
- category: ['employee', 'company', 'job'],
430
- action: ['search_es_dsl'],
425
+ resource: ['employee', 'company', 'job'],
426
+ operation: ['search_es_dsl'],
431
427
  },
432
428
  },
433
429
  description: 'Whether to use preview endpoint (returns up to 20 results with essential data)',
@@ -442,27 +438,27 @@ class Coresignal {
442
438
  const returnData = [];
443
439
  for (let i = 0; i < items.length; i++) {
444
440
  try {
445
- const category = this.getNodeParameter('category', i);
441
+ const resource = this.getNodeParameter('resource', i);
446
442
  const dataset = 'multi_source'; // Always use multi_source
447
- const action = this.getNodeParameter('action', i);
443
+ const operation = this.getNodeParameter('operation', i);
448
444
  let url = '';
449
445
  let httpMethod = 'GET';
450
446
  let body;
451
447
  const qs = {};
452
448
  // Build the data source string (e.g., "company_multi_source", "employee_multi_source")
453
449
  // Posts use a different endpoint structure
454
- const dataSource = category === 'post' ? 'employee_post' : `${category}_${dataset}`;
450
+ const dataSource = resource === 'post' ? 'employee_post' : `${resource}_${dataset}`;
455
451
  const baseEndpoint = `/cdapi/v2/${dataSource}`;
456
- switch (action) {
457
- case 'collect_by_id': {
452
+ switch (operation) {
453
+ case 'get_by_id': {
458
454
  let id;
459
- if (category === 'company') {
455
+ if (resource === 'company') {
460
456
  id = this.getNodeParameter('companyId', i);
461
457
  }
462
- else if (category === 'employee') {
458
+ else if (resource === 'employee') {
463
459
  id = this.getNodeParameter('employeeId', i);
464
460
  }
465
- else if (category === 'job') {
461
+ else if (resource === 'job') {
466
462
  id = this.getNodeParameter('jobId', i);
467
463
  }
468
464
  else {
@@ -476,7 +472,7 @@ class Coresignal {
476
472
  }
477
473
  break;
478
474
  }
479
- case 'collect_by_slug': {
475
+ case 'get_by_slug': {
480
476
  const slug = this.getNodeParameter('slug', i);
481
477
  url = `${baseEndpoint}/collect/${encodeURIComponent(slug)}`;
482
478
  httpMethod = 'GET';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-coresignal-api",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "n8n community node for Coresignal API - access company, employee, job, and post data",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -22,7 +22,8 @@
22
22
  "dev": "n8n-node dev",
23
23
  "lint": "n8n-node lint",
24
24
  "lintfix": "n8n-node lint --fix",
25
- "prepublishOnly": "n8n-node build"
25
+ "release": "n8n-node release",
26
+ "prepublishOnly": "n8n-node prerelease"
26
27
  },
27
28
  "files": [
28
29
  "dist"
@@ -38,10 +39,10 @@
38
39
  ]
39
40
  },
40
41
  "devDependencies": {
41
- "@n8n/node-cli": "*",
42
+ "@n8n/node-cli": "0.23.0",
42
43
  "eslint": "9.32.0",
43
- "prettier": "3.6.2",
44
- "typescript": "5.9.2"
44
+ "prettier": "3.8.1",
45
+ "typescript": "5.9.3"
45
46
  },
46
47
  "peerDependencies": {
47
48
  "n8n-workflow": "*"