n8n-nodes-coresignal-api 1.0.2 → 1.1.0

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,7 +10,7 @@ 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: {
@@ -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',
36
+ name: 'Employee',
37
37
  value: 'employee',
38
38
  description: 'Access employee data and profiles',
39
39
  },
40
40
  {
41
- name: 'Company Data',
41
+ name: 'Company',
42
42
  value: 'company',
43
43
  description: 'Access company data and profiles',
44
44
  },
45
45
  {
46
- name: 'Job Data',
46
+ name: 'Job',
47
47
  value: 'job',
48
48
  description: 'Access jobs data',
49
49
  },
50
50
  {
51
- name: 'Employee Posts',
51
+ name: 'Employee Post',
52
52
  value: 'post',
53
53
  description: 'Access employee posts data',
54
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',
72
+ name: 'Get by ID',
73
+ value: 'get_by_id',
74
74
  description: 'Retrieve a full company profile using a company ID',
75
- action: 'Retrieve a full company profile using a company ID',
75
+ action: 'Get company by ID',
76
76
  },
77
77
  {
78
- name: 'Collect by Slug',
79
- value: 'collect_by_slug',
78
+ name: 'Get by Slug',
79
+ value: 'get_by_slug',
80
80
  description: 'Retrieve a full company profile using a URL slug',
81
- action: 'Retrieve a full company profile using a URL slug',
81
+ action: 'Get company by URL slug',
82
82
  },
83
83
  {
84
84
  name: 'Enrich by Website',
85
85
  value: 'enrich',
86
86
  description: 'Enrich company data using a website URL',
87
- action: 'Enrich company data using a website URL',
87
+ action: 'Enrich company by website URL',
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,13 @@ 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
306
  // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
307
- placeholder: 'e.g., id,full_name,headline',
307
+ placeholder: 'e.g. id,full_name,headline',
308
308
  description: 'Comma-separated list of fields to return (leave empty for all fields)',
309
309
  },
310
310
  // Fields Parameter - Company
@@ -314,13 +314,13 @@ class Coresignal {
314
314
  type: 'string',
315
315
  displayOptions: {
316
316
  show: {
317
- category: ['company'],
318
- action: ['collect_by_id', 'collect_by_slug', 'enrich'],
317
+ resource: ['company'],
318
+ operation: ['get_by_id', 'get_by_slug', 'enrich'],
319
319
  },
320
320
  },
321
321
  default: '',
322
322
  // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
323
- placeholder: 'e.g., id,company_name,website',
323
+ placeholder: 'e.g. id,company_name,website',
324
324
  description: 'Comma-separated list of fields to return (leave empty for all fields)',
325
325
  },
326
326
  // Fields Parameter - Jobs
@@ -330,13 +330,13 @@ class Coresignal {
330
330
  type: 'string',
331
331
  displayOptions: {
332
332
  show: {
333
- category: ['job'],
334
- action: ['collect_by_id'],
333
+ resource: ['job'],
334
+ operation: ['get_by_id'],
335
335
  },
336
336
  },
337
337
  default: '',
338
338
  // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
339
- placeholder: 'e.g., id,title,company_name',
339
+ placeholder: 'e.g. id,title,company_name',
340
340
  description: 'Comma-separated list of fields to return (leave empty for all fields)',
341
341
  },
342
342
  // Fields Parameter - Posts
@@ -346,13 +346,13 @@ class Coresignal {
346
346
  type: 'string',
347
347
  displayOptions: {
348
348
  show: {
349
- category: ['post'],
350
- action: ['collect_by_id'],
349
+ resource: ['post'],
350
+ operation: ['get_by_id'],
351
351
  },
352
352
  },
353
353
  default: '',
354
354
  // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
355
- placeholder: 'e.g., id,url,author_name',
355
+ placeholder: 'e.g. id,url,author_name',
356
356
  description: 'Comma-separated list of fields to return (leave empty for all fields)',
357
357
  },
358
358
  // Elasticsearch DSL Query - Employee
@@ -363,8 +363,8 @@ class Coresignal {
363
363
  required: true,
364
364
  displayOptions: {
365
365
  show: {
366
- category: ['employee'],
367
- action: ['search_es_dsl'],
366
+ resource: ['employee'],
367
+ operation: ['search_es_dsl'],
368
368
  },
369
369
  },
370
370
  default: '{"query": {"match_all": {}}}',
@@ -379,8 +379,8 @@ class Coresignal {
379
379
  required: true,
380
380
  displayOptions: {
381
381
  show: {
382
- category: ['company'],
383
- action: ['search_es_dsl'],
382
+ resource: ['company'],
383
+ operation: ['search_es_dsl'],
384
384
  },
385
385
  },
386
386
  default: '{"query": {"match_all": {}}}',
@@ -395,8 +395,8 @@ class Coresignal {
395
395
  required: true,
396
396
  displayOptions: {
397
397
  show: {
398
- category: ['job'],
399
- action: ['search_es_dsl'],
398
+ resource: ['job'],
399
+ operation: ['search_es_dsl'],
400
400
  },
401
401
  },
402
402
  default: '{"query": {"match_all": {}}}',
@@ -411,8 +411,8 @@ class Coresignal {
411
411
  required: true,
412
412
  displayOptions: {
413
413
  show: {
414
- category: ['post'],
415
- action: ['search_es_dsl'],
414
+ resource: ['post'],
415
+ operation: ['search_es_dsl'],
416
416
  },
417
417
  },
418
418
  default: '{"query": {"match_all": {}}}',
@@ -426,8 +426,8 @@ class Coresignal {
426
426
  default: false,
427
427
  displayOptions: {
428
428
  show: {
429
- category: ['employee', 'company', 'job'],
430
- action: ['search_es_dsl'],
429
+ resource: ['employee', 'company', 'job'],
430
+ operation: ['search_es_dsl'],
431
431
  },
432
432
  },
433
433
  description: 'Whether to use preview endpoint (returns up to 20 results with essential data)',
@@ -442,27 +442,27 @@ class Coresignal {
442
442
  const returnData = [];
443
443
  for (let i = 0; i < items.length; i++) {
444
444
  try {
445
- const category = this.getNodeParameter('category', i);
445
+ const resource = this.getNodeParameter('resource', i);
446
446
  const dataset = 'multi_source'; // Always use multi_source
447
- const action = this.getNodeParameter('action', i);
447
+ const operation = this.getNodeParameter('operation', i);
448
448
  let url = '';
449
449
  let httpMethod = 'GET';
450
450
  let body;
451
451
  const qs = {};
452
452
  // Build the data source string (e.g., "company_multi_source", "employee_multi_source")
453
453
  // Posts use a different endpoint structure
454
- const dataSource = category === 'post' ? 'employee_post' : `${category}_${dataset}`;
454
+ const dataSource = resource === 'post' ? 'employee_post' : `${resource}_${dataset}`;
455
455
  const baseEndpoint = `/cdapi/v2/${dataSource}`;
456
- switch (action) {
457
- case 'collect_by_id': {
456
+ switch (operation) {
457
+ case 'get_by_id': {
458
458
  let id;
459
- if (category === 'company') {
459
+ if (resource === 'company') {
460
460
  id = this.getNodeParameter('companyId', i);
461
461
  }
462
- else if (category === 'employee') {
462
+ else if (resource === 'employee') {
463
463
  id = this.getNodeParameter('employeeId', i);
464
464
  }
465
- else if (category === 'job') {
465
+ else if (resource === 'job') {
466
466
  id = this.getNodeParameter('jobId', i);
467
467
  }
468
468
  else {
@@ -476,7 +476,7 @@ class Coresignal {
476
476
  }
477
477
  break;
478
478
  }
479
- case 'collect_by_slug': {
479
+ case 'get_by_slug': {
480
480
  const slug = this.getNodeParameter('slug', i);
481
481
  url = `${baseEndpoint}/collect/${encodeURIComponent(slug)}`;
482
482
  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.0",
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",
@@ -38,10 +38,10 @@
38
38
  ]
39
39
  },
40
40
  "devDependencies": {
41
- "@n8n/node-cli": "*",
41
+ "@n8n/node-cli": "0.23.0",
42
42
  "eslint": "9.32.0",
43
- "prettier": "3.6.2",
44
- "typescript": "5.9.2"
43
+ "prettier": "3.8.1",
44
+ "typescript": "5.9.3"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "n8n-workflow": "*"