n8n-nodes-pubrio 0.1.4 → 0.2.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.
- package/dist/credentials/PubrioApi.credentials.d.ts +2 -2
- package/dist/credentials/PubrioApi.credentials.js +2 -2
- package/dist/credentials/PubrioApi.credentials.js.map +1 -1
- package/dist/nodes/Pubrio/Pubrio.node.js +10 -0
- package/dist/nodes/Pubrio/Pubrio.node.js.map +1 -1
- package/dist/nodes/Pubrio/Pubrio.node.json +1 -1
- package/dist/nodes/Pubrio/PubrioTrigger.node.d.ts +5 -0
- package/dist/nodes/Pubrio/PubrioTrigger.node.js +47 -0
- package/dist/nodes/Pubrio/PubrioTrigger.node.js.map +1 -0
- package/dist/nodes/Pubrio/PubrioTrigger.node.json +13 -0
- package/dist/nodes/Pubrio/resources/company/advertisementLookup.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/advertisementLookup.js +15 -0
- package/dist/nodes/Pubrio/resources/company/advertisementLookup.js.map +1 -0
- package/dist/nodes/Pubrio/resources/company/advertisementSearch.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/advertisementSearch.js +104 -0
- package/dist/nodes/Pubrio/resources/company/advertisementSearch.js.map +1 -0
- package/dist/nodes/Pubrio/resources/company/index.js +199 -23
- package/dist/nodes/Pubrio/resources/company/index.js.map +1 -1
- package/dist/nodes/Pubrio/resources/company/jobLookup.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/jobLookup.js +15 -0
- package/dist/nodes/Pubrio/resources/company/jobLookup.js.map +1 -0
- package/dist/nodes/Pubrio/resources/company/jobSearch.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/jobSearch.js +104 -0
- package/dist/nodes/Pubrio/resources/company/jobSearch.js.map +1 -0
- package/dist/nodes/Pubrio/resources/company/lookalikeLookup.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/lookalikeLookup.js +29 -0
- package/dist/nodes/Pubrio/resources/company/lookalikeLookup.js.map +1 -0
- package/dist/nodes/Pubrio/resources/company/lookalikeSearch.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/lookalikeSearch.js +197 -0
- package/dist/nodes/Pubrio/resources/company/lookalikeSearch.js.map +1 -0
- package/dist/nodes/Pubrio/resources/company/newsLookup.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/newsLookup.js +15 -0
- package/dist/nodes/Pubrio/resources/company/newsLookup.js.map +1 -0
- package/dist/nodes/Pubrio/resources/company/newsSearch.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/newsSearch.js +118 -0
- package/dist/nodes/Pubrio/resources/company/newsSearch.js.map +1 -0
- package/dist/nodes/Pubrio/resources/company/search.js +165 -11
- package/dist/nodes/Pubrio/resources/company/search.js.map +1 -1
- package/dist/nodes/Pubrio/resources/company/technologyLookup.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/company/technologyLookup.js +30 -0
- package/dist/nodes/Pubrio/resources/company/technologyLookup.js.map +1 -0
- package/dist/nodes/Pubrio/resources/filter/index.d.ts +4 -0
- package/dist/nodes/Pubrio/resources/filter/index.js +143 -0
- package/dist/nodes/Pubrio/resources/filter/index.js.map +1 -0
- package/dist/nodes/Pubrio/resources/filter/search.d.ts +2 -0
- package/dist/nodes/Pubrio/resources/filter/search.js +25 -0
- package/dist/nodes/Pubrio/resources/filter/search.js.map +1 -0
- package/dist/nodes/Pubrio/resources/monitor/index.js +4 -14
- package/dist/nodes/Pubrio/resources/monitor/index.js.map +1 -1
- package/dist/nodes/Pubrio/resources/monitor/list.js +13 -11
- package/dist/nodes/Pubrio/resources/monitor/list.js.map +1 -1
- package/dist/nodes/Pubrio/resources/monitor/stats.js +13 -11
- package/dist/nodes/Pubrio/resources/monitor/stats.js.map +1 -1
- package/dist/nodes/Pubrio/resources/people/index.js +8 -7
- package/dist/nodes/Pubrio/resources/people/index.js.map +1 -1
- package/dist/nodes/Pubrio/resources/people/search.js +27 -11
- package/dist/nodes/Pubrio/resources/people/search.js.map +1 -1
- package/dist/nodes/Pubrio/shared/descriptions.d.ts +1 -2
- package/dist/nodes/Pubrio/shared/descriptions.js +12 -19
- package/dist/nodes/Pubrio/shared/descriptions.js.map +1 -1
- package/dist/nodes/Pubrio/shared/transport.d.ts +0 -1
- package/dist/nodes/Pubrio/shared/transport.js +0 -31
- package/dist/nodes/Pubrio/shared/transport.js.map +1 -1
- package/dist/package.json +7 -4
- package/package.json +5 -2
|
@@ -4,8 +4,8 @@ export declare class PubrioApi implements ICredentialType {
|
|
|
4
4
|
displayName: string;
|
|
5
5
|
documentationUrl: string;
|
|
6
6
|
icon: {
|
|
7
|
-
readonly light: "file
|
|
8
|
-
readonly dark: "file
|
|
7
|
+
readonly light: "file:../icons/pubrio.svg";
|
|
8
|
+
readonly dark: "file:../icons/pubrio.svg";
|
|
9
9
|
};
|
|
10
10
|
properties: INodeProperties[];
|
|
11
11
|
authenticate: IAuthenticateGeneric;
|
|
@@ -7,8 +7,8 @@ class PubrioApi {
|
|
|
7
7
|
this.displayName = 'Pubrio API';
|
|
8
8
|
this.documentationUrl = 'https://docs.pubrio.com/en/api-reference/introduction';
|
|
9
9
|
this.icon = {
|
|
10
|
-
light: 'file
|
|
11
|
-
dark: 'file
|
|
10
|
+
light: 'file:../icons/pubrio.svg',
|
|
11
|
+
dark: 'file:../icons/pubrio.svg',
|
|
12
12
|
};
|
|
13
13
|
this.properties = [
|
|
14
14
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PubrioApi.credentials.js","sourceRoot":"","sources":["../../credentials/PubrioApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QAEnB,gBAAW,GAAG,YAAY,CAAC;QAE3B,qBAAgB,GAAG,uDAAuD,CAAC;QAE3E,SAAI,GAAG;YACN,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"PubrioApi.credentials.js","sourceRoot":"","sources":["../../credentials/PubrioApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QAEnB,gBAAW,GAAG,YAAY,CAAC;QAE3B,qBAAgB,GAAG,uDAAuD,CAAC;QAE3E,SAAI,GAAG;YACN,KAAK,EAAE,0BAA0B;YACjC,IAAI,EAAE,0BAA0B;SACvB,CAAC;QAEX,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iDAAiD;aAC9D;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,kCAAkC;aAC/C;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,gBAAgB,EAAE,0BAA0B;iBAC5C;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,wBAAwB;gBACjC,GAAG,EAAE,OAAO;gBACZ,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAhDD,8BAgDC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Pubrio = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
5
|
const company_1 = require("./resources/company");
|
|
6
|
+
const filter_1 = require("./resources/filter");
|
|
6
7
|
const monitor_1 = require("./resources/monitor");
|
|
7
8
|
const people_1 = require("./resources/people");
|
|
8
9
|
const profile_1 = require("./resources/profile");
|
|
@@ -39,6 +40,10 @@ class Pubrio {
|
|
|
39
40
|
name: 'Company',
|
|
40
41
|
value: 'company',
|
|
41
42
|
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Filter',
|
|
45
|
+
value: 'filter',
|
|
46
|
+
},
|
|
42
47
|
{
|
|
43
48
|
name: 'Monitor',
|
|
44
49
|
value: 'monitor',
|
|
@@ -58,6 +63,8 @@ class Pubrio {
|
|
|
58
63
|
...profile_1.profileFields,
|
|
59
64
|
...company_1.companyOperations,
|
|
60
65
|
...company_1.companyFields,
|
|
66
|
+
...filter_1.filterOperations,
|
|
67
|
+
...filter_1.filterFields,
|
|
61
68
|
...people_1.peopleOperations,
|
|
62
69
|
...people_1.peopleFields,
|
|
63
70
|
...monitor_1.monitorOperations,
|
|
@@ -82,6 +89,9 @@ class Pubrio {
|
|
|
82
89
|
else if (resource === 'people') {
|
|
83
90
|
responseData = await people_1.executePeopleOperation.call(this, operation, i);
|
|
84
91
|
}
|
|
92
|
+
else if (resource === 'filter') {
|
|
93
|
+
responseData = await filter_1.executeFilterOperation.call(this, operation, i);
|
|
94
|
+
}
|
|
85
95
|
else if (resource === 'monitor') {
|
|
86
96
|
responseData = await monitor_1.executeMonitorOperation.call(this, operation, i);
|
|
87
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pubrio.node.js","sourceRoot":"","sources":["../../../nodes/Pubrio/Pubrio.node.ts"],"names":[],"mappings":";;;AAMA,+CAAiE;AAEjE,iDAAgG;AAChG,iDAAgG;AAChG,+CAA4F;AAC5F,iDAAgG;AAEhG,MAAa,MAAM;IAAnB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,QAAQ;YACrB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,6BAA6B;YACnC,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE;gBACT,IAAI,EAAE,QAAQ;aACd;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,SAAS;4BACf,KAAK,EAAE,SAAS;yBAChB;wBACD;4BACC,IAAI,EAAE,SAAS;4BACf,KAAK,EAAE,SAAS;yBAChB;wBACD;4BACC,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,QAAQ;yBACf;wBACD;4BACC,IAAI,EAAE,SAAS;4BACf,KAAK,EAAE,SAAS;yBAChB;qBACD;oBACD,OAAO,EAAE,SAAS;iBAClB;gBACD,GAAG,2BAAiB;gBACpB,GAAG,uBAAa;gBAChB,GAAG,2BAAiB;gBACpB,GAAG,uBAAa;gBAChB,GAAG,yBAAgB;gBACnB,GAAG,qBAAY;gBACf,GAAG,2BAAiB;gBACpB,GAAG,uBAAa;aAChB;SACD,CAAC;
|
|
1
|
+
{"version":3,"file":"Pubrio.node.js","sourceRoot":"","sources":["../../../nodes/Pubrio/Pubrio.node.ts"],"names":[],"mappings":";;;AAMA,+CAAiE;AAEjE,iDAAgG;AAChG,+CAA4F;AAC5F,iDAAgG;AAChG,+CAA4F;AAC5F,iDAAgG;AAEhG,MAAa,MAAM;IAAnB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,QAAQ;YACrB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,6BAA6B;YACnC,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EA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eAAe,CAAC,YAAY,CAAC,EAC1C,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CACzB,CAAC;gBACF,UAAU,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;YACnC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE;wBACzC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;qBACvB,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AA5GD,wBA4GC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IWebhookFunctions, IWebhookResponseData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class PubrioTrigger implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PubrioTrigger = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class PubrioTrigger {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Pubrio Trigger',
|
|
9
|
+
name: 'pubrioTrigger',
|
|
10
|
+
icon: 'file:../../icons/pubrio.svg',
|
|
11
|
+
group: ['trigger'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: 'Receives Pubrio monitor webhook events',
|
|
14
|
+
description: 'Starts a workflow when a Pubrio monitor sends data to this webhook',
|
|
15
|
+
defaults: {
|
|
16
|
+
name: 'Pubrio Trigger',
|
|
17
|
+
},
|
|
18
|
+
usableAsTool: true,
|
|
19
|
+
inputs: [],
|
|
20
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
+
webhooks: [
|
|
22
|
+
{
|
|
23
|
+
name: 'default',
|
|
24
|
+
httpMethod: 'POST',
|
|
25
|
+
responseMode: 'onReceived',
|
|
26
|
+
path: 'pubrio-webhook',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
properties: [
|
|
30
|
+
{
|
|
31
|
+
displayName: 'Copy the webhook URL shown above and paste it as the destination webhook URL when creating or updating a Pubrio monitor.',
|
|
32
|
+
name: 'notice',
|
|
33
|
+
type: 'notice',
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
async webhook() {
|
|
40
|
+
const bodyData = this.getBodyData();
|
|
41
|
+
return {
|
|
42
|
+
workflowData: [this.helpers.returnJsonArray(bodyData)],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.PubrioTrigger = PubrioTrigger;
|
|
47
|
+
//# sourceMappingURL=PubrioTrigger.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PubrioTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Pubrio/PubrioTrigger.node.ts"],"names":[],"mappings":";;;AAMA,+CAAmD;AAEnD,MAAa,aAAa;IAA1B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,6BAA6B;YACnC,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,wCAAwC;YAClD,WAAW,EAAE,oEAAoE;YACjF,QAAQ,EAAE;gBACT,IAAI,EAAE,gBAAgB;aACtB;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,QAAQ,EAAE;gBACT;oBACC,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,MAAM;oBAClB,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE,gBAAgB;iBACtB;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EACV,0HAA0H;oBAC3H,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;iBACX;aACD;SACD,CAAC;IAQH,CAAC;IANA,KAAK,CAAC,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,OAAO;YACN,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;SACtD,CAAC;IACH,CAAC;CACD;AAxCD,sCAwCC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-pubrio.pubrioTrigger",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Sales", "Marketing & Growth"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"primaryDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://docs.pubrio.com/en/api-reference/introduction"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.companyAdvertisementLookupFields = void 0;
|
|
4
|
+
exports.companyAdvertisementLookupFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Advertisement Search ID',
|
|
7
|
+
name: 'advertisementSearchId',
|
|
8
|
+
type: 'string',
|
|
9
|
+
required: true,
|
|
10
|
+
default: '',
|
|
11
|
+
description: 'The UUID of the advertisement search result to look up',
|
|
12
|
+
displayOptions: { show: { resource: ['company'], operation: ['advertisementLookup'] } },
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=advertisementLookup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advertisementLookup.js","sourceRoot":"","sources":["../../../../../nodes/Pubrio/resources/company/advertisementLookup.ts"],"names":[],"mappings":";;;AAEa,QAAA,gCAAgC,GAAsB;IAClE;QACC,WAAW,EAAE,yBAAyB;QACtC,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,wDAAwD;QACrE,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,qBAAqB,CAAC,EAAE,EAAE;KACvF;CACD,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.companyAdvertisementSearchFields = void 0;
|
|
4
|
+
exports.companyAdvertisementSearchFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Page',
|
|
7
|
+
name: 'page',
|
|
8
|
+
type: 'number',
|
|
9
|
+
default: 1,
|
|
10
|
+
typeOptions: { minValue: 1 },
|
|
11
|
+
description: 'Page number of results to return',
|
|
12
|
+
displayOptions: { show: { resource: ['company'], operation: ['advertisementSearch'] } },
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
displayName: 'Per Page',
|
|
16
|
+
name: 'perPage',
|
|
17
|
+
type: 'number',
|
|
18
|
+
default: 25,
|
|
19
|
+
typeOptions: { minValue: 1, maxValue: 25 },
|
|
20
|
+
description: 'Number of results per page (max 25)',
|
|
21
|
+
displayOptions: { show: { resource: ['company'], operation: ['advertisementSearch'] } },
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
displayName: 'Filters',
|
|
25
|
+
name: 'filters',
|
|
26
|
+
type: 'collection',
|
|
27
|
+
placeholder: 'Add Filter',
|
|
28
|
+
default: {},
|
|
29
|
+
displayOptions: { show: { resource: ['company'], operation: ['advertisementSearch'] } },
|
|
30
|
+
options: [
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Companies',
|
|
33
|
+
name: 'companies',
|
|
34
|
+
type: 'string',
|
|
35
|
+
default: '',
|
|
36
|
+
description: 'Comma-separated company domain_search_id UUIDs',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Company Locations',
|
|
40
|
+
name: 'company_locations',
|
|
41
|
+
type: 'string',
|
|
42
|
+
default: '',
|
|
43
|
+
description: 'Comma-separated ISO country codes for company HQ',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Domains',
|
|
47
|
+
name: 'domains',
|
|
48
|
+
type: 'string',
|
|
49
|
+
default: '',
|
|
50
|
+
description: 'Comma-separated company domains',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
displayName: 'End Dates',
|
|
54
|
+
name: 'end_dates',
|
|
55
|
+
type: 'string',
|
|
56
|
+
default: '',
|
|
57
|
+
description: 'Comma-separated date range for campaign end dates (YYYY-MM-DD)',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
displayName: 'Exclude Target Locations',
|
|
61
|
+
name: 'exclude_target_locations',
|
|
62
|
+
type: 'string',
|
|
63
|
+
default: '',
|
|
64
|
+
description: 'Comma-separated country codes to exclude from ad targeting',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Headlines',
|
|
68
|
+
name: 'headlines',
|
|
69
|
+
type: 'string',
|
|
70
|
+
default: '',
|
|
71
|
+
description: 'Comma-separated ad headline text to filter by',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'LinkedIn URLs',
|
|
75
|
+
name: 'linkedin_urls',
|
|
76
|
+
type: 'string',
|
|
77
|
+
default: '',
|
|
78
|
+
description: 'Comma-separated LinkedIn company URLs',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
displayName: 'Search Terms',
|
|
82
|
+
name: 'search_terms',
|
|
83
|
+
type: 'string',
|
|
84
|
+
default: '',
|
|
85
|
+
description: 'Comma-separated keywords to filter advertisements',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
displayName: 'Start Dates',
|
|
89
|
+
name: 'start_dates',
|
|
90
|
+
type: 'string',
|
|
91
|
+
default: '',
|
|
92
|
+
description: 'Comma-separated date range for campaign start dates (YYYY-MM-DD)',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Target Locations',
|
|
96
|
+
name: 'target_locations',
|
|
97
|
+
type: 'string',
|
|
98
|
+
default: '',
|
|
99
|
+
description: 'Comma-separated country codes for ad target locations',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
//# sourceMappingURL=advertisementSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advertisementSearch.js","sourceRoot":"","sources":["../../../../../nodes/Pubrio/resources/company/advertisementSearch.ts"],"names":[],"mappings":";;;AAEa,QAAA,gCAAgC,GAAsB;IAClE;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;QAC5B,WAAW,EAAE,kCAAkC;QAC/C,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,qBAAqB,CAAC,EAAE,EAAE;KACvF;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,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AAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,+CAA+C;aAC5D;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uCAAuC;aACpD;YACD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mDAAmD;aAChE;YACD;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,kEAAkE;aAC/E;YACD;gBACC,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uDAAuD;aACpE;SACD;KACD;CACD,CAAC"}
|
|
@@ -3,14 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.companyFields = exports.companyOperations = void 0;
|
|
4
4
|
exports.executeCompanyOperation = executeCompanyOperation;
|
|
5
5
|
const transport_1 = require("../../shared/transport");
|
|
6
|
+
const advertisementLookup_1 = require("./advertisementLookup");
|
|
7
|
+
const advertisementSearch_1 = require("./advertisementSearch");
|
|
6
8
|
const enrich_1 = require("./enrich");
|
|
9
|
+
const jobLookup_1 = require("./jobLookup");
|
|
10
|
+
const jobSearch_1 = require("./jobSearch");
|
|
7
11
|
const linkedinLookup_1 = require("./linkedinLookup");
|
|
12
|
+
const lookalikeLookup_1 = require("./lookalikeLookup");
|
|
13
|
+
const lookalikeSearch_1 = require("./lookalikeSearch");
|
|
8
14
|
const lookup_1 = require("./lookup");
|
|
15
|
+
const newsLookup_1 = require("./newsLookup");
|
|
16
|
+
const newsSearch_1 = require("./newsSearch");
|
|
9
17
|
const search_1 = require("./search");
|
|
18
|
+
const technologyLookup_1 = require("./technologyLookup");
|
|
10
19
|
const LOOKUP_TYPE_MAP = {
|
|
11
20
|
domain: 'domain',
|
|
12
|
-
|
|
21
|
+
domainId: 'domain_id',
|
|
13
22
|
domainSearchId: 'domain_search_id',
|
|
23
|
+
linkedinUrl: 'linkedin_url',
|
|
14
24
|
};
|
|
15
25
|
exports.companyOperations = [
|
|
16
26
|
{
|
|
@@ -24,30 +34,84 @@ exports.companyOperations = [
|
|
|
24
34
|
},
|
|
25
35
|
},
|
|
26
36
|
options: [
|
|
37
|
+
{
|
|
38
|
+
name: 'Advertisement Lookup',
|
|
39
|
+
value: 'advertisementLookup',
|
|
40
|
+
description: 'Look up advertisement details by ID',
|
|
41
|
+
action: 'Look up an advertisement',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Advertisement Search',
|
|
45
|
+
value: 'advertisementSearch',
|
|
46
|
+
description: 'Search company advertisements and campaigns',
|
|
47
|
+
action: 'Search advertisements',
|
|
48
|
+
},
|
|
27
49
|
{
|
|
28
50
|
name: 'Enrich',
|
|
29
51
|
value: 'enrich',
|
|
30
52
|
description: 'Get enriched company data by domain, LinkedIn URL, or ID',
|
|
31
53
|
action: 'Enrich a company',
|
|
32
54
|
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Job Lookup',
|
|
57
|
+
value: 'jobLookup',
|
|
58
|
+
description: 'Look up job posting details by ID',
|
|
59
|
+
action: 'Look up a job posting',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Job Search',
|
|
63
|
+
value: 'jobSearch',
|
|
64
|
+
description: 'Search job postings across companies',
|
|
65
|
+
action: 'Search job postings',
|
|
66
|
+
},
|
|
33
67
|
{
|
|
34
68
|
name: 'LinkedIn Lookup',
|
|
35
69
|
value: 'linkedinLookup',
|
|
36
70
|
description: 'Real-time LinkedIn company lookup',
|
|
37
71
|
action: 'Look up a company on linked in in real time',
|
|
38
72
|
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Lookalike Lookup',
|
|
75
|
+
value: 'lookalikeLookup',
|
|
76
|
+
description: 'Look up lookalike companies for a given company',
|
|
77
|
+
action: 'Look up lookalike companies',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Lookalike Search',
|
|
81
|
+
value: 'lookalikeSearch',
|
|
82
|
+
description: 'Search for similar companies with filters',
|
|
83
|
+
action: 'Search lookalike companies',
|
|
84
|
+
},
|
|
39
85
|
{
|
|
40
86
|
name: 'Lookup',
|
|
41
87
|
value: 'lookup',
|
|
42
88
|
description: 'Look up a company by domain, LinkedIn URL, or ID',
|
|
43
89
|
action: 'Look up a company',
|
|
44
90
|
},
|
|
91
|
+
{
|
|
92
|
+
name: 'News Lookup',
|
|
93
|
+
value: 'newsLookup',
|
|
94
|
+
description: 'Look up news article details by ID',
|
|
95
|
+
action: 'Look up a news article',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'News Search',
|
|
99
|
+
value: 'newsSearch',
|
|
100
|
+
description: 'Search company news and press releases',
|
|
101
|
+
action: 'Search company news',
|
|
102
|
+
},
|
|
45
103
|
{
|
|
46
104
|
name: 'Search',
|
|
47
105
|
value: 'search',
|
|
48
106
|
description: 'Search companies with filters',
|
|
49
107
|
action: 'Search companies',
|
|
50
108
|
},
|
|
109
|
+
{
|
|
110
|
+
name: 'Technology Lookup',
|
|
111
|
+
value: 'technologyLookup',
|
|
112
|
+
description: 'Look up technologies used by a company',
|
|
113
|
+
action: 'Look up company technologies',
|
|
114
|
+
},
|
|
51
115
|
],
|
|
52
116
|
default: 'search',
|
|
53
117
|
},
|
|
@@ -57,52 +121,102 @@ exports.companyFields = [
|
|
|
57
121
|
...lookup_1.companyLookupFields,
|
|
58
122
|
...enrich_1.companyEnrichFields,
|
|
59
123
|
...linkedinLookup_1.companyLinkedinLookupFields,
|
|
124
|
+
...jobSearch_1.companyJobSearchFields,
|
|
125
|
+
...jobLookup_1.companyJobLookupFields,
|
|
126
|
+
...newsSearch_1.companyNewsSearchFields,
|
|
127
|
+
...newsLookup_1.companyNewsLookupFields,
|
|
128
|
+
...advertisementSearch_1.companyAdvertisementSearchFields,
|
|
129
|
+
...advertisementLookup_1.companyAdvertisementLookupFields,
|
|
130
|
+
...lookalikeSearch_1.companyLookalikeSearchFields,
|
|
131
|
+
...lookalikeLookup_1.companyLookalikeLookupFields,
|
|
132
|
+
...technologyLookup_1.companyTechnologyLookupFields,
|
|
60
133
|
];
|
|
134
|
+
function splitComma(value) {
|
|
135
|
+
return value.split(',').map((v) => v.trim()).filter((v) => v);
|
|
136
|
+
}
|
|
61
137
|
function buildSearchBody(context, itemIndex) {
|
|
62
138
|
const body = {};
|
|
63
139
|
const filters = context.getNodeParameter('filters', itemIndex, {});
|
|
140
|
+
// String fields
|
|
64
141
|
if (filters.company_name)
|
|
65
142
|
body.company_name = filters.company_name;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
143
|
+
// Comma-separated array fields
|
|
144
|
+
const commaFields = [
|
|
145
|
+
'domains', 'linkedin_urls', 'locations', 'exclude_locations',
|
|
146
|
+
'places', 'exclude_places', 'job_locations', 'job_exclude_locations',
|
|
147
|
+
'job_posted_dates', 'job_titles', 'keywords', 'companies',
|
|
148
|
+
'news_categories', 'news_published_dates',
|
|
149
|
+
'advertisement_search_terms', 'advertisement_target_locations',
|
|
150
|
+
'advertisement_exclude_target_locations', 'advertisement_start_dates',
|
|
151
|
+
'advertisement_end_dates', 'exclude_fields',
|
|
152
|
+
'verticals', 'vertical_categories', 'vertical_sub_categories',
|
|
153
|
+
'categories', 'technologies',
|
|
154
|
+
];
|
|
155
|
+
for (const field of commaFields) {
|
|
156
|
+
if (filters[field]) {
|
|
157
|
+
body[field] = splitComma(filters[field]);
|
|
158
|
+
}
|
|
77
159
|
}
|
|
160
|
+
// Employee count (array-of-arrays format)
|
|
78
161
|
if (filters.employees) {
|
|
79
162
|
const parts = filters.employees.split(',').map(Number);
|
|
80
163
|
body.employees = [parts];
|
|
81
164
|
}
|
|
165
|
+
// Range fields
|
|
82
166
|
if (filters.revenue_min || filters.revenue_max) {
|
|
83
167
|
body.revenues = [filters.revenue_min || 0, filters.revenue_max || 999999999999];
|
|
84
168
|
}
|
|
85
169
|
if (filters.founded_year_start || filters.founded_year_end) {
|
|
86
170
|
body.founded_dates = [filters.founded_year_start || 1900, filters.founded_year_end || 2100];
|
|
87
171
|
}
|
|
88
|
-
|
|
89
|
-
|
|
172
|
+
// Boolean fields
|
|
173
|
+
if (filters.is_enable_similarity_search !== undefined) {
|
|
174
|
+
body.is_enable_similarity_search = filters.is_enable_similarity_search;
|
|
90
175
|
}
|
|
91
|
-
|
|
92
|
-
|
|
176
|
+
// Number fields
|
|
177
|
+
if (filters.similarity_score)
|
|
178
|
+
body.similarity_score = filters.similarity_score;
|
|
179
|
+
return body;
|
|
180
|
+
}
|
|
181
|
+
function buildFilterBody(context, itemIndex) {
|
|
182
|
+
const body = {};
|
|
183
|
+
const filters = context.getNodeParameter('filters', itemIndex, {});
|
|
184
|
+
for (const [key, value] of Object.entries(filters)) {
|
|
185
|
+
if (value === '' || value === undefined || value === null)
|
|
186
|
+
continue;
|
|
187
|
+
if (key === 'search_term') {
|
|
188
|
+
body.search_term = value;
|
|
189
|
+
}
|
|
190
|
+
else if (key === 'employees') {
|
|
191
|
+
const parts = value.split(',').map(Number);
|
|
192
|
+
body.employees = [parts];
|
|
193
|
+
}
|
|
194
|
+
else if (key === 'revenue_min' || key === 'revenue_max') {
|
|
195
|
+
// handled below
|
|
196
|
+
}
|
|
197
|
+
else if (key === 'is_enable_similarity_search') {
|
|
198
|
+
body.is_enable_similarity_search = value;
|
|
199
|
+
}
|
|
200
|
+
else if (key === 'similarity_score') {
|
|
201
|
+
body.similarity_score = value;
|
|
202
|
+
}
|
|
203
|
+
else if (typeof value === 'string') {
|
|
204
|
+
body[key] = splitComma(value);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
body[key] = value;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (filters.revenue_min || filters.revenue_max) {
|
|
211
|
+
body.revenues = [filters.revenue_min || 0, filters.revenue_max || 999999999999];
|
|
93
212
|
}
|
|
94
213
|
return body;
|
|
95
214
|
}
|
|
96
215
|
async function executeCompanyOperation(operation, itemIndex) {
|
|
97
216
|
if (operation === 'search') {
|
|
98
|
-
const returnAll = this.getNodeParameter('returnAll', itemIndex);
|
|
99
217
|
const body = buildSearchBody(this, itemIndex);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
const limit = this.getNodeParameter('limit', itemIndex);
|
|
104
|
-
body.per_page = limit;
|
|
105
|
-
body.page = 1;
|
|
218
|
+
body.page = this.getNodeParameter('page', itemIndex, 1);
|
|
219
|
+
body.per_page = this.getNodeParameter('perPage', itemIndex, 25);
|
|
106
220
|
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/search', body);
|
|
107
221
|
}
|
|
108
222
|
if (operation === 'lookup') {
|
|
@@ -127,6 +241,68 @@ async function executeCompanyOperation(operation, itemIndex) {
|
|
|
127
241
|
linkedin_url: linkedinUrl,
|
|
128
242
|
});
|
|
129
243
|
}
|
|
244
|
+
if (operation === 'jobSearch') {
|
|
245
|
+
const body = buildFilterBody(this, itemIndex);
|
|
246
|
+
body.page = this.getNodeParameter('page', itemIndex, 1);
|
|
247
|
+
body.per_page = this.getNodeParameter('perPage', itemIndex, 25);
|
|
248
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/jobs/search', body);
|
|
249
|
+
}
|
|
250
|
+
if (operation === 'jobLookup') {
|
|
251
|
+
const jobSearchId = this.getNodeParameter('jobSearchId', itemIndex);
|
|
252
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/jobs/lookup', {
|
|
253
|
+
job_search_id: jobSearchId,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
if (operation === 'newsSearch') {
|
|
257
|
+
const body = buildFilterBody(this, itemIndex);
|
|
258
|
+
body.page = this.getNodeParameter('page', itemIndex, 1);
|
|
259
|
+
body.per_page = this.getNodeParameter('perPage', itemIndex, 25);
|
|
260
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/news/search', body);
|
|
261
|
+
}
|
|
262
|
+
if (operation === 'newsLookup') {
|
|
263
|
+
const newsSearchId = this.getNodeParameter('newsSearchId', itemIndex);
|
|
264
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/news/lookup', {
|
|
265
|
+
news_search_id: newsSearchId,
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
if (operation === 'advertisementSearch') {
|
|
269
|
+
const body = buildFilterBody(this, itemIndex);
|
|
270
|
+
body.page = this.getNodeParameter('page', itemIndex, 1);
|
|
271
|
+
body.per_page = this.getNodeParameter('perPage', itemIndex, 25);
|
|
272
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/advertisements/search', body);
|
|
273
|
+
}
|
|
274
|
+
if (operation === 'advertisementLookup') {
|
|
275
|
+
const id = this.getNodeParameter('advertisementSearchId', itemIndex);
|
|
276
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/advertisements/lookup', {
|
|
277
|
+
advertisement_search_id: id,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
if (operation === 'lookalikeSearch') {
|
|
281
|
+
const lookupType = this.getNodeParameter('lookupType', itemIndex);
|
|
282
|
+
const lookupValue = this.getNodeParameter('lookupValue', itemIndex);
|
|
283
|
+
const bodyKey = LOOKUP_TYPE_MAP[lookupType];
|
|
284
|
+
const body = buildFilterBody(this, itemIndex);
|
|
285
|
+
body[bodyKey] = lookupValue;
|
|
286
|
+
body.page = this.getNodeParameter('page', itemIndex, 1);
|
|
287
|
+
body.per_page = this.getNodeParameter('perPage', itemIndex, 25);
|
|
288
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/lookalikes/search', body);
|
|
289
|
+
}
|
|
290
|
+
if (operation === 'lookalikeLookup') {
|
|
291
|
+
const lookupType = this.getNodeParameter('lookupType', itemIndex);
|
|
292
|
+
const lookupValue = this.getNodeParameter('lookupValue', itemIndex);
|
|
293
|
+
const bodyKey = LOOKUP_TYPE_MAP[lookupType];
|
|
294
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/companies/lookalikes/lookup', {
|
|
295
|
+
[bodyKey]: lookupValue,
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
if (operation === 'technologyLookup') {
|
|
299
|
+
const lookupType = this.getNodeParameter('lookupType', itemIndex);
|
|
300
|
+
const lookupValue = this.getNodeParameter('lookupValue', itemIndex);
|
|
301
|
+
const bodyKey = LOOKUP_TYPE_MAP[lookupType];
|
|
302
|
+
return await transport_1.pubrioApiRequest.call(this, 'POST', '/technologies/lookup', {
|
|
303
|
+
[bodyKey]: lookupValue,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
130
306
|
throw new Error(`Unknown company operation: ${operation}`);
|
|
131
307
|
}
|
|
132
308
|
//# sourceMappingURL=index.js.map
|