@mendable/n8n-nodes-firecrawl 1.0.6 → 2.0.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/README.md +72 -8
- package/dist/nodes/Firecrawl/Firecrawl.node.d.ts +0 -3
- package/dist/nodes/Firecrawl/Firecrawl.node.js +2 -1
- package/dist/nodes/Firecrawl/Firecrawl.node.js.map +1 -1
- package/dist/nodes/Firecrawl/api/agent/index.d.ts +5 -0
- package/dist/nodes/Firecrawl/api/agent/index.js +364 -0
- package/dist/nodes/Firecrawl/api/agent/index.js.map +1 -0
- package/dist/nodes/Firecrawl/api/agentAsync/index.d.ts +5 -0
- package/dist/nodes/Firecrawl/api/agentAsync/index.js +262 -0
- package/dist/nodes/Firecrawl/api/agentAsync/index.js.map +1 -0
- package/dist/nodes/Firecrawl/api/batchScrape/index.d.ts +2 -1
- package/dist/nodes/Firecrawl/api/batchScrape/index.js +56 -7
- package/dist/nodes/Firecrawl/api/batchScrape/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/batchScrapeErrors/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/batchScrapeErrors/index.js +4 -3
- package/dist/nodes/Firecrawl/api/batchScrapeErrors/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/batchScrapeStatus/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/batchScrapeStatus/index.js +4 -3
- package/dist/nodes/Firecrawl/api/batchScrapeStatus/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/cancelBatchScrape/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/cancelBatchScrape/index.js +4 -3
- package/dist/nodes/Firecrawl/api/cancelBatchScrape/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/cancelCrawl/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/cancelCrawl/index.js +4 -3
- package/dist/nodes/Firecrawl/api/cancelCrawl/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/common.d.ts +7 -5
- package/dist/nodes/Firecrawl/api/common.js +180 -60
- package/dist/nodes/Firecrawl/api/common.js.map +1 -1
- package/dist/nodes/Firecrawl/api/crawl/index.d.ts +2 -1
- package/dist/nodes/Firecrawl/api/crawl/index.js +24 -23
- package/dist/nodes/Firecrawl/api/crawl/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/crawlActive/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/crawlActive/index.js +3 -2
- package/dist/nodes/Firecrawl/api/crawlActive/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/crawlParamsPreview/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/crawlParamsPreview/index.js +4 -3
- package/dist/nodes/Firecrawl/api/crawlParamsPreview/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/creditUsageHistorical/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/creditUsageHistorical/index.js +3 -2
- package/dist/nodes/Firecrawl/api/creditUsageHistorical/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/extract/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/extract/index.js +20 -19
- package/dist/nodes/Firecrawl/api/extract/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/getAgentStatus/index.d.ts +5 -0
- package/dist/nodes/Firecrawl/api/getAgentStatus/index.js +52 -0
- package/dist/nodes/Firecrawl/api/getAgentStatus/index.js.map +1 -0
- package/dist/nodes/Firecrawl/api/getCrawlErrors/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/getCrawlErrors/index.js +4 -3
- package/dist/nodes/Firecrawl/api/getCrawlErrors/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/getCrawlStatus/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/getCrawlStatus/index.js +4 -3
- package/dist/nodes/Firecrawl/api/getCrawlStatus/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/getExtractStatus/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/getExtractStatus/index.js +4 -3
- package/dist/nodes/Firecrawl/api/getExtractStatus/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/index.d.ts +36 -17
- package/dist/nodes/Firecrawl/api/index.js +171 -54
- package/dist/nodes/Firecrawl/api/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/map/index.d.ts +2 -1
- package/dist/nodes/Firecrawl/api/map/index.js +15 -14
- package/dist/nodes/Firecrawl/api/map/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/scrape/index.d.ts +2 -1
- package/dist/nodes/Firecrawl/api/scrape/index.js +56 -7
- package/dist/nodes/Firecrawl/api/scrape/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/search/index.d.ts +2 -1
- package/dist/nodes/Firecrawl/api/search/index.js +13 -9
- package/dist/nodes/Firecrawl/api/search/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/teamCreditUsage/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/teamCreditUsage/index.js +3 -2
- package/dist/nodes/Firecrawl/api/teamCreditUsage/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/teamQueueStatus/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/teamQueueStatus/index.js +3 -2
- package/dist/nodes/Firecrawl/api/teamQueueStatus/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/teamTokenUsage/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/teamTokenUsage/index.js +3 -2
- package/dist/nodes/Firecrawl/api/teamTokenUsage/index.js.map +1 -1
- package/dist/nodes/Firecrawl/api/teamTokenUsageHistorical/index.d.ts +1 -0
- package/dist/nodes/Firecrawl/api/teamTokenUsageHistorical/index.js +3 -2
- package/dist/nodes/Firecrawl/api/teamTokenUsageHistorical/index.js.map +1 -1
- package/dist/nodes/Firecrawl/methods.d.ts +0 -3
- package/dist/nodes/Firecrawl/methods.js +17 -2
- package/dist/nodes/Firecrawl/methods.js.map +1 -1
- package/dist/nodes/Firecrawl/properties.js +40 -63
- package/dist/nodes/Firecrawl/properties.js.map +1 -1
- package/dist/package.json +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = exports.options = exports.resourceName = exports.operationName = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const name = 'agentAsync';
|
|
6
|
+
const displayName = 'Agent (Async) - Returns job ID for manual polling';
|
|
7
|
+
exports.operationName = 'agentAsync';
|
|
8
|
+
exports.resourceName = 'Agent';
|
|
9
|
+
function createPromptProperty() {
|
|
10
|
+
return {
|
|
11
|
+
displayName: 'Prompt',
|
|
12
|
+
name: 'prompt',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: {
|
|
15
|
+
rows: 4,
|
|
16
|
+
},
|
|
17
|
+
required: true,
|
|
18
|
+
default: '',
|
|
19
|
+
description: 'Natural language description of the data you want to extract (max 10,000 characters). Be specific about what data you need. Examples: "Find the founders of Firecrawl", "Extract pricing information from this page", "Compare features between these products".',
|
|
20
|
+
placeholder: 'e.g., Find the founders of Firecrawl and their roles',
|
|
21
|
+
routing: {
|
|
22
|
+
request: {
|
|
23
|
+
body: {
|
|
24
|
+
prompt: '={{ $value }}',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
displayOptions: {
|
|
29
|
+
hide: {
|
|
30
|
+
useCustomBody: [true],
|
|
31
|
+
},
|
|
32
|
+
show: {
|
|
33
|
+
resource: [exports.resourceName],
|
|
34
|
+
operation: [exports.operationName],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function createSpecifyUrlsProperty() {
|
|
40
|
+
return {
|
|
41
|
+
displayName: 'Specify URLs',
|
|
42
|
+
name: 'specifyUrls',
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
default: false,
|
|
45
|
+
description: 'Whether to specify URLs for the agent to focus on. If disabled, the agent will autonomously search and navigate the web to find your data.',
|
|
46
|
+
displayOptions: {
|
|
47
|
+
hide: {
|
|
48
|
+
useCustomBody: [true],
|
|
49
|
+
},
|
|
50
|
+
show: {
|
|
51
|
+
resource: [exports.resourceName],
|
|
52
|
+
operation: [exports.operationName],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function createUrlsProperty() {
|
|
58
|
+
return {
|
|
59
|
+
displayName: 'URLs',
|
|
60
|
+
name: 'urls',
|
|
61
|
+
type: 'string',
|
|
62
|
+
typeOptions: {
|
|
63
|
+
rows: 4,
|
|
64
|
+
},
|
|
65
|
+
default: '',
|
|
66
|
+
description: 'URLs to focus the agent on specific pages. Accepts multiple formats: a single URL, multiple URLs separated by commas or newlines, or a JSON array like ["url1", "url2"].',
|
|
67
|
+
placeholder: 'https://example.com/page1\nhttps://example.com/page2',
|
|
68
|
+
routing: {
|
|
69
|
+
request: {
|
|
70
|
+
body: {
|
|
71
|
+
urls: '={{ $value }}',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
send: {
|
|
75
|
+
preSend: [
|
|
76
|
+
async function (requestOptions) {
|
|
77
|
+
if (typeof requestOptions.body !== 'object' || !requestOptions.body) {
|
|
78
|
+
return requestOptions;
|
|
79
|
+
}
|
|
80
|
+
const body = requestOptions.body;
|
|
81
|
+
if (body.urls !== undefined) {
|
|
82
|
+
const rawValue = body.urls;
|
|
83
|
+
if (!rawValue || (typeof rawValue === 'string' && !rawValue.trim())) {
|
|
84
|
+
delete body.urls;
|
|
85
|
+
return requestOptions;
|
|
86
|
+
}
|
|
87
|
+
const urlsArray = (0, common_1.extractUrls)(rawValue);
|
|
88
|
+
const uniqueUrls = [...new Set(urlsArray)].filter(Boolean);
|
|
89
|
+
if (uniqueUrls.length === 0) {
|
|
90
|
+
delete body.urls;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
body.urls = uniqueUrls;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return requestOptions;
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
displayOptions: {
|
|
102
|
+
hide: {
|
|
103
|
+
useCustomBody: [true],
|
|
104
|
+
},
|
|
105
|
+
show: {
|
|
106
|
+
resource: [exports.resourceName],
|
|
107
|
+
operation: [exports.operationName],
|
|
108
|
+
specifyUrls: [true],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function createSchemaTypeProperty() {
|
|
114
|
+
return {
|
|
115
|
+
displayName: 'Schema Type',
|
|
116
|
+
name: 'schemaType',
|
|
117
|
+
type: 'options',
|
|
118
|
+
default: 'none',
|
|
119
|
+
description: 'Optionally define a schema for the extracted data structure',
|
|
120
|
+
options: [
|
|
121
|
+
{
|
|
122
|
+
name: 'None',
|
|
123
|
+
value: 'none',
|
|
124
|
+
description: 'No schema - let the agent determine the output structure',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'Generate From JSON Example',
|
|
128
|
+
value: 'fromExample',
|
|
129
|
+
description: 'Generate a schema from an example JSON object',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'Define Using JSON Schema',
|
|
133
|
+
value: 'manual',
|
|
134
|
+
description: 'Define the JSON schema manually',
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
displayOptions: {
|
|
138
|
+
hide: {
|
|
139
|
+
useCustomBody: [true],
|
|
140
|
+
},
|
|
141
|
+
show: {
|
|
142
|
+
resource: [exports.resourceName],
|
|
143
|
+
operation: [exports.operationName],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function createJsonExampleProperty() {
|
|
149
|
+
return {
|
|
150
|
+
displayName: 'JSON Example',
|
|
151
|
+
name: 'jsonExample',
|
|
152
|
+
type: 'json',
|
|
153
|
+
default: '{\n "founders": [\n {\n "name": "John Doe",\n "role": "CEO"\n }\n ]\n}',
|
|
154
|
+
description: 'Provide an example of the JSON structure you want to extract. The schema will be automatically generated from this example.',
|
|
155
|
+
routing: {
|
|
156
|
+
request: {
|
|
157
|
+
body: {
|
|
158
|
+
jsonExample: '={{ $value }}',
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
send: {
|
|
162
|
+
preSend: [
|
|
163
|
+
async function (requestOptions) {
|
|
164
|
+
if (typeof requestOptions.body !== 'object' || !requestOptions.body) {
|
|
165
|
+
return requestOptions;
|
|
166
|
+
}
|
|
167
|
+
const body = requestOptions.body;
|
|
168
|
+
if (body.jsonExample !== undefined) {
|
|
169
|
+
try {
|
|
170
|
+
let example;
|
|
171
|
+
if (typeof body.jsonExample === 'string') {
|
|
172
|
+
const trimmed = body.jsonExample.trim();
|
|
173
|
+
if (!trimmed) {
|
|
174
|
+
delete body.jsonExample;
|
|
175
|
+
return requestOptions;
|
|
176
|
+
}
|
|
177
|
+
example = JSON.parse(trimmed);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
example = body.jsonExample;
|
|
181
|
+
}
|
|
182
|
+
body.schema = (0, common_1.convertToSchema)(example);
|
|
183
|
+
delete body.jsonExample;
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
throw new Error('Invalid JSON example. Please provide valid JSON.');
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return requestOptions;
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
displayOptions: {
|
|
195
|
+
hide: {
|
|
196
|
+
useCustomBody: [true],
|
|
197
|
+
},
|
|
198
|
+
show: {
|
|
199
|
+
resource: [exports.resourceName],
|
|
200
|
+
operation: [exports.operationName],
|
|
201
|
+
schemaType: ['fromExample'],
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function createSchemaProperty() {
|
|
207
|
+
return {
|
|
208
|
+
displayName: 'Schema',
|
|
209
|
+
name: 'schema',
|
|
210
|
+
type: 'json',
|
|
211
|
+
default: '{\n "type": "object",\n "properties": {\n "founders": {\n "type": "array",\n "items": {\n "type": "object",\n "properties": {\n "name": { "type": "string" },\n "role": { "type": "string" }\n }\n }\n }\n }\n}',
|
|
212
|
+
description: 'JSON Schema defining the structure of extracted data. Use JSON Schema format with type definitions. $refs syntax is currently not supported.',
|
|
213
|
+
routing: {
|
|
214
|
+
request: {
|
|
215
|
+
body: {
|
|
216
|
+
schema: '={{ JSON.parse($value) }}',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
displayOptions: {
|
|
221
|
+
hide: {
|
|
222
|
+
useCustomBody: [true],
|
|
223
|
+
},
|
|
224
|
+
show: {
|
|
225
|
+
resource: [exports.resourceName],
|
|
226
|
+
operation: [exports.operationName],
|
|
227
|
+
schemaType: ['manual'],
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function createAgentProperties() {
|
|
233
|
+
return [
|
|
234
|
+
(0, common_1.createOperationNotice)(exports.resourceName, name, 'POST'),
|
|
235
|
+
createPromptProperty(),
|
|
236
|
+
createSpecifyUrlsProperty(),
|
|
237
|
+
createUrlsProperty(),
|
|
238
|
+
createSchemaTypeProperty(),
|
|
239
|
+
createJsonExampleProperty(),
|
|
240
|
+
createSchemaProperty(),
|
|
241
|
+
];
|
|
242
|
+
}
|
|
243
|
+
const { options, properties } = (0, common_1.buildApiProperties)(name, displayName, createAgentProperties());
|
|
244
|
+
exports.options = options;
|
|
245
|
+
exports.properties = properties;
|
|
246
|
+
options.routing = {
|
|
247
|
+
request: {
|
|
248
|
+
method: 'POST',
|
|
249
|
+
url: '=/agent',
|
|
250
|
+
},
|
|
251
|
+
output: {
|
|
252
|
+
postReceive: [
|
|
253
|
+
{
|
|
254
|
+
type: 'rootProperty',
|
|
255
|
+
properties: {
|
|
256
|
+
property: 'body',
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/agentAsync/index.ts"],"names":[],"mappings":";;;AAMA,sCAAoG;AAEpG,MAAM,IAAI,GAAG,YAAY,CAAC;AAC1B,MAAM,WAAW,GAAG,mDAAmD,CAAC;AAC3D,QAAA,aAAa,GAAG,YAAY,CAAC;AAC7B,QAAA,YAAY,GAAG,OAAO,CAAC;AAMpC,SAAS,oBAAoB;IAC5B,OAAO;QACN,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,IAAI,EAAE,CAAC;SACP;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EACV,kQAAkQ;QACnQ,WAAW,EAAE,sDAAsD;QACnE,OAAO,EAAE;YACR,OAAO,EAAE;gBACR,IAAI,EAAE;oBACL,MAAM,EAAE,eAAe;iBACvB;aACD;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,aAAa,EAAE,CAAC,IAAI,CAAC;aACrB;YACD,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,oBAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,qBAAa,CAAC;aAC1B;SACD;KACD,CAAC;AACH,CAAC;AAMD,SAAS,yBAAyB;IACjC,OAAO;QACN,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EACV,4IAA4I;QAC7I,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,aAAa,EAAE,CAAC,IAAI,CAAC;aACrB;YACD,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC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d,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,gRAAgR;QACzR,WAAW,EACV,8IAA8I;QAC/I,OAAO,EAAE;YACR,OAAO,EAAE;gBACR,IAAI,EAAE;oBACL,MAAM,EAAE,2BAA2B;iBACnC;aACD;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,aAAa,EAAE,CAAC,IAAI,CAAC;aACrB;YACD,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,oBAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,qBAAa,CAAC;gBAC1B,UAAU,EAAE,CAAC,QAAQ,CAAC;aACtB;SACD;KACD,CAAC;AACH,CAAC;AAMD,SAAS,qBAAqB;IAC7B,OAAO;QACN,IAAA,8BAAqB,EAAC,oBAAY,EAAE,IAAI,EAAE,MAAM,CAAC;QACjD,oBAAoB,EAAE;QACtB,yBAAyB,EAAE;QAC3B,kBAAkB,EAAE;QACpB,wBAAwB,EAAE;QAC1B,yBAAyB,EAAE;QAC3B,oBAAoB,EAAE;KACtB,CAAC;AACH,CAAC;AAGD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC,CAAC;AAoBtF,0BAAO;AAAE,gCAAU;AAjB5B,OAAO,CAAC,OAAO,GAAG;IACjB,OAAO,EAAE;QACR,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,SAAS;KACd;IACD,MAAM,EAAE;QACP,WAAW,EAAE;YACZ;gBACC,IAAI,EAAE,cAAc;gBACpB,UAAU,EAAE;oBACX,QAAQ,EAAE,MAAM;iBAChB;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare const name = "batchScrape";
|
|
3
|
-
export declare const displayName = "Batch scrape multiple URLs";
|
|
3
|
+
export declare const displayName = "Batch scrape multiple URLs simultaneously";
|
|
4
4
|
export declare const operationName = "batchScrape";
|
|
5
|
+
export declare const resourceName = "Scraping";
|
|
5
6
|
declare const options: import("n8n-workflow").INodePropertyOptions, properties: INodeProperties[];
|
|
6
7
|
export { options, properties };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.properties = exports.options = exports.operationName = exports.displayName = exports.name = void 0;
|
|
4
|
+
exports.properties = exports.options = exports.resourceName = exports.operationName = exports.displayName = exports.name = void 0;
|
|
5
5
|
const common_1 = require("../common");
|
|
6
6
|
exports.name = 'batchScrape';
|
|
7
|
-
exports.displayName = 'Batch scrape multiple URLs';
|
|
7
|
+
exports.displayName = 'Batch scrape multiple URLs simultaneously';
|
|
8
8
|
exports.operationName = 'batchScrape';
|
|
9
|
+
exports.resourceName = 'Scraping';
|
|
9
10
|
function createParsersProperty(operationName) {
|
|
10
11
|
return {
|
|
11
12
|
displayName: 'Parsers',
|
|
@@ -15,23 +16,71 @@ function createParsersProperty(operationName) {
|
|
|
15
16
|
{
|
|
16
17
|
name: 'PDF',
|
|
17
18
|
value: 'pdf',
|
|
19
|
+
description: 'Extract PDF content as markdown (1 credit per page)',
|
|
18
20
|
},
|
|
19
21
|
],
|
|
20
22
|
default: [],
|
|
21
|
-
description: '
|
|
23
|
+
description: 'Enable file parsers for content extraction. Select "PDF" to extract PDF content as markdown text. Leave empty to get PDFs as base64 data.',
|
|
22
24
|
routing: {
|
|
23
25
|
request: {
|
|
24
26
|
body: {
|
|
25
27
|
parsers: '={{ $value }}',
|
|
26
28
|
},
|
|
27
29
|
},
|
|
30
|
+
send: {
|
|
31
|
+
preSend: [
|
|
32
|
+
async function (requestOptions) {
|
|
33
|
+
if (typeof requestOptions.body !== 'object' || !requestOptions.body) {
|
|
34
|
+
return requestOptions;
|
|
35
|
+
}
|
|
36
|
+
const body = requestOptions.body;
|
|
37
|
+
if (body.parsers !== undefined) {
|
|
38
|
+
let rawValue = body.parsers;
|
|
39
|
+
while (Array.isArray(rawValue) && rawValue.length === 1 && Array.isArray(rawValue[0])) {
|
|
40
|
+
rawValue = rawValue[0];
|
|
41
|
+
}
|
|
42
|
+
const extractStrings = (val) => {
|
|
43
|
+
if (typeof val === 'string') {
|
|
44
|
+
try {
|
|
45
|
+
const parsed = JSON.parse(val);
|
|
46
|
+
return extractStrings(parsed);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return val.trim() ? [val.trim().toLowerCase()] : [];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(val)) {
|
|
53
|
+
return val.flatMap(extractStrings);
|
|
54
|
+
}
|
|
55
|
+
if (typeof val === 'object' && val !== null && 'type' in val) {
|
|
56
|
+
const typeVal = val.type;
|
|
57
|
+
if (typeof typeVal === 'string') {
|
|
58
|
+
return [typeVal.toLowerCase()];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return [];
|
|
62
|
+
};
|
|
63
|
+
const parsersArray = extractStrings(rawValue);
|
|
64
|
+
const validParsers = ['pdf'];
|
|
65
|
+
const uniqueParsers = [...new Set(parsersArray)].filter((p) => validParsers.includes(p));
|
|
66
|
+
if (uniqueParsers.length === 0) {
|
|
67
|
+
delete body.parsers;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
body.parsers = uniqueParsers.map((parser) => ({ type: parser }));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return requestOptions;
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
28
77
|
},
|
|
29
78
|
displayOptions: {
|
|
30
79
|
hide: {
|
|
31
80
|
useCustomBody: [true],
|
|
32
81
|
},
|
|
33
82
|
show: {
|
|
34
|
-
resource: [
|
|
83
|
+
resource: [exports.resourceName],
|
|
35
84
|
operation: [operationName],
|
|
36
85
|
},
|
|
37
86
|
},
|
|
@@ -94,10 +143,10 @@ function createAdditionalFieldsProperty(operation) {
|
|
|
94
143
|
}
|
|
95
144
|
function createScrapeProperties() {
|
|
96
145
|
return [
|
|
97
|
-
(0, common_1.createOperationNotice)(
|
|
98
|
-
(0, common_1.createBatchUrlsProperty)(exports.name, '
|
|
146
|
+
(0, common_1.createOperationNotice)(exports.resourceName, exports.name, 'POST'),
|
|
147
|
+
(0, common_1.createBatchUrlsProperty)(exports.name, '', exports.resourceName),
|
|
99
148
|
createParsersProperty(exports.operationName),
|
|
100
|
-
(0, common_1.createScrapeOptionsProperty)(exports.operationName, false, true),
|
|
149
|
+
(0, common_1.createScrapeOptionsProperty)(exports.operationName, false, true, exports.resourceName),
|
|
101
150
|
];
|
|
102
151
|
}
|
|
103
152
|
const { options, properties } = (0, common_1.buildApiProperties)(exports.name, exports.displayName, createScrapeProperties());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/batchScrape/index.ts"],"names":[],"mappings":";;;;AAMA,sCAKmB;AAGN,QAAA,IAAI,GAAG,aAAa,CAAC;AACrB,QAAA,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/batchScrape/index.ts"],"names":[],"mappings":";;;;AAMA,sCAKmB;AAGN,QAAA,IAAI,GAAG,aAAa,CAAC;AACrB,QAAA,WAAW,GAAG,2CAA2C,CAAC;AAC1D,QAAA,aAAa,GAAG,aAAa,CAAC;AAC9B,QAAA,YAAY,GAAG,UAAU,CAAC;AAOvC,SAAS,qBAAqB,CAAC,aAAqB;IACnD,OAAO;QACN,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,qDAAqD;aAClE;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EACV,2IAA2I;QAC5I,O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AGpC,IAAA,oCAA2B,EAAC,qBAAa,EAAE,KAAK,EAAE,IAAI,EAAE,oBAAY,CAAC;KACrE,CAAC;AACH,CAAC;AAGD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAA,2BAAkB,EAAC,YAAI,EAAE,mBAAW,EAAE,sBAAsB,EAAE,CAAC,CAAC;AAwBvF,0BAAO;AAAE,gCAAU;AArB5B,OAAO,CAAC,OAAO,GAAG;IACjB,GAAG,OAAO,CAAC,OAAO;IAClB,OAAO,EAAE;QACR,GAAG,CAAC,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,OAAO,KAAI,EAAE,CAAC;QACnC,GAAG,EAAE,eAAe;KACpB;IACD,MAAM,EAAE;QACP,WAAW,EAAE;YACZ;gBACC,IAAI,EAAE,aAAa;gBACnB,UAAU,EAAE;oBACX,IAAI,EAAE,qBAAqB;iBAC3B;aACD;SACD;KACD;CACD,CAAC;AAGF,UAAU,CAAC,IAAI,CAAC,8BAA8B,CAAC,YAAI,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare const name = "batchScrapeErrors";
|
|
3
3
|
export declare const displayName = "Get batch scrape errors";
|
|
4
|
+
export declare const resourceName = "Scraping";
|
|
4
5
|
declare const options: import("n8n-workflow").INodePropertyOptions, properties: INodeProperties[];
|
|
5
6
|
export { options, properties };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.options = exports.displayName = exports.name = void 0;
|
|
3
|
+
exports.properties = exports.options = exports.resourceName = exports.displayName = exports.name = void 0;
|
|
4
4
|
const common_1 = require("../common");
|
|
5
5
|
exports.name = 'batchScrapeErrors';
|
|
6
6
|
exports.displayName = 'Get batch scrape errors';
|
|
7
|
+
exports.resourceName = 'Scraping';
|
|
7
8
|
function createBatchIdProperty() {
|
|
8
9
|
return {
|
|
9
10
|
displayName: 'Batch ID',
|
|
@@ -19,14 +20,14 @@ function createBatchIdProperty() {
|
|
|
19
20
|
},
|
|
20
21
|
displayOptions: {
|
|
21
22
|
show: {
|
|
22
|
-
resource: [
|
|
23
|
+
resource: [exports.resourceName],
|
|
23
24
|
operation: [exports.name],
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
function createProperties() {
|
|
29
|
-
return [(0, common_1.createOperationNotice)(
|
|
30
|
+
return [(0, common_1.createOperationNotice)(exports.resourceName, exports.name, 'GET'), createBatchIdProperty()];
|
|
30
31
|
}
|
|
31
32
|
const { options, properties } = (0, common_1.buildApiProperties)(exports.name, exports.displayName, createProperties());
|
|
32
33
|
exports.options = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/batchScrapeErrors/index.ts"],"names":[],"mappings":";;;AACA,sCAAsE;AAEzD,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAC3B,QAAA,WAAW,GAAG,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/batchScrapeErrors/index.ts"],"names":[],"mappings":";;;AACA,sCAAsE;AAEzD,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAC3B,QAAA,WAAW,GAAG,yBAAyB,CAAC;AACxC,QAAA,YAAY,GAAG,UAAU,CAAC;AAEvC,SAAS,qBAAqB;IAC7B,OAAO;QACN,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE;YACR,OAAO,EAAE;gBACR,GAAG,EAAE,kCAAkC;aACvC;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,oBAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,YAAI,CAAC;aACjB;SACD;KACD,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB;IACxB,OAAO,CAAC,IAAA,8BAAqB,EAAC,oBAAY,EAAE,YAAI,EAAE,KAAK,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAA,2BAAkB,EAAC,YAAI,EAAE,mBAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAQjF,0BAAO;AAAE,gCAAU;AAN5B,OAAO,CAAC,OAAO,GAAG;IACjB,OAAO,EAAE;QACR,MAAM,EAAE,KAAK;KACb;CACD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare const name = "batchScrapeStatus";
|
|
3
3
|
export declare const displayName = "Get batch scrape status";
|
|
4
|
+
export declare const resourceName = "Scraping";
|
|
4
5
|
declare const options: import("n8n-workflow").INodePropertyOptions, properties: INodeProperties[];
|
|
5
6
|
export { options, properties };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.options = exports.displayName = exports.name = void 0;
|
|
3
|
+
exports.properties = exports.options = exports.resourceName = exports.displayName = exports.name = void 0;
|
|
4
4
|
const common_1 = require("../common");
|
|
5
5
|
exports.name = 'batchScrapeStatus';
|
|
6
6
|
exports.displayName = 'Get batch scrape status';
|
|
7
|
+
exports.resourceName = 'Scraping';
|
|
7
8
|
function createBatchIdProperty() {
|
|
8
9
|
return {
|
|
9
10
|
displayName: 'Batch ID',
|
|
@@ -19,14 +20,14 @@ function createBatchIdProperty() {
|
|
|
19
20
|
},
|
|
20
21
|
displayOptions: {
|
|
21
22
|
show: {
|
|
22
|
-
resource: [
|
|
23
|
+
resource: [exports.resourceName],
|
|
23
24
|
operation: [exports.name],
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
function createProperties() {
|
|
29
|
-
return [(0, common_1.createOperationNotice)(
|
|
30
|
+
return [(0, common_1.createOperationNotice)(exports.resourceName, exports.name, 'GET'), createBatchIdProperty()];
|
|
30
31
|
}
|
|
31
32
|
const { options, properties } = (0, common_1.buildApiProperties)(exports.name, exports.displayName, createProperties());
|
|
32
33
|
exports.options = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/batchScrapeStatus/index.ts"],"names":[],"mappings":";;;AACA,sCAAsE;AAEzD,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAC3B,QAAA,WAAW,GAAG,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/batchScrapeStatus/index.ts"],"names":[],"mappings":";;;AACA,sCAAsE;AAEzD,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAC3B,QAAA,WAAW,GAAG,yBAAyB,CAAC;AACxC,QAAA,YAAY,GAAG,UAAU,CAAC;AAEvC,SAAS,qBAAqB;IAC7B,OAAO;QACN,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE;YACR,OAAO,EAAE;gBACR,GAAG,EAAE,2BAA2B;aAChC;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,oBAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,YAAI,CAAC;aACjB;SACD;KACD,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB;IACxB,OAAO,CAAC,IAAA,8BAAqB,EAAC,oBAAY,EAAE,YAAI,EAAE,KAAK,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAA,2BAAkB,EAAC,YAAI,EAAE,mBAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAQjF,0BAAO;AAAE,gCAAU;AAN5B,OAAO,CAAC,OAAO,GAAG;IACjB,OAAO,EAAE;QACR,MAAM,EAAE,KAAK;KACb;CACD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare const name = "cancelBatchScrape";
|
|
3
3
|
export declare const displayName = "Cancel batch scrape job";
|
|
4
|
+
export declare const resourceName = "Scraping";
|
|
4
5
|
declare const options: import("n8n-workflow").INodePropertyOptions, properties: INodeProperties[];
|
|
5
6
|
export { options, properties };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.options = exports.displayName = exports.name = void 0;
|
|
3
|
+
exports.properties = exports.options = exports.resourceName = exports.displayName = exports.name = void 0;
|
|
4
4
|
const common_1 = require("../common");
|
|
5
5
|
exports.name = 'cancelBatchScrape';
|
|
6
6
|
exports.displayName = 'Cancel batch scrape job';
|
|
7
|
+
exports.resourceName = 'Scraping';
|
|
7
8
|
function createBatchIdProperty() {
|
|
8
9
|
return {
|
|
9
10
|
displayName: 'Batch ID',
|
|
@@ -19,14 +20,14 @@ function createBatchIdProperty() {
|
|
|
19
20
|
},
|
|
20
21
|
displayOptions: {
|
|
21
22
|
show: {
|
|
22
|
-
resource: [
|
|
23
|
+
resource: [exports.resourceName],
|
|
23
24
|
operation: [exports.name],
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
function createProperties() {
|
|
29
|
-
return [(0, common_1.createOperationNotice)(
|
|
30
|
+
return [(0, common_1.createOperationNotice)(exports.resourceName, exports.name, 'DELETE'), createBatchIdProperty()];
|
|
30
31
|
}
|
|
31
32
|
const { options, properties } = (0, common_1.buildApiProperties)(exports.name, exports.displayName, createProperties());
|
|
32
33
|
exports.options = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/cancelBatchScrape/index.ts"],"names":[],"mappings":";;;AACA,sCAAsE;AAEzD,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAC3B,QAAA,WAAW,GAAG,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/cancelBatchScrape/index.ts"],"names":[],"mappings":";;;AACA,sCAAsE;AAEzD,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAC3B,QAAA,WAAW,GAAG,yBAAyB,CAAC;AACxC,QAAA,YAAY,GAAG,UAAU,CAAC;AAEvC,SAAS,qBAAqB;IAC7B,OAAO;QACN,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE;YACR,OAAO,EAAE;gBACR,GAAG,EAAE,2BAA2B;aAChC;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,oBAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,YAAI,CAAC;aACjB;SACD;KACD,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB;IACxB,OAAO,CAAC,IAAA,8BAAqB,EAAC,oBAAY,EAAE,YAAI,EAAE,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC;AACvF,CAAC;AAED,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAA,2BAAkB,EAAC,YAAI,EAAE,mBAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAQjF,0BAAO;AAAE,gCAAU;AAN5B,OAAO,CAAC,OAAO,GAAG;IACjB,OAAO,EAAE;QACR,MAAM,EAAE,QAAQ;KAChB;CACD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare const name = "cancelCrawl";
|
|
3
3
|
export declare const displayName = "Cancel a crawl job";
|
|
4
|
+
export declare const resourceName = "Crawling";
|
|
4
5
|
declare const options: import("n8n-workflow").INodePropertyOptions, properties: INodeProperties[];
|
|
5
6
|
export { options, properties };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.options = exports.displayName = exports.name = void 0;
|
|
3
|
+
exports.properties = exports.options = exports.resourceName = exports.displayName = exports.name = void 0;
|
|
4
4
|
const common_1 = require("../common");
|
|
5
5
|
exports.name = 'cancelCrawl';
|
|
6
6
|
exports.displayName = 'Cancel a crawl job';
|
|
7
|
+
exports.resourceName = 'Crawling';
|
|
7
8
|
function createCrawlIdProperty() {
|
|
8
9
|
return {
|
|
9
10
|
displayName: 'Crawl ID',
|
|
@@ -19,14 +20,14 @@ function createCrawlIdProperty() {
|
|
|
19
20
|
},
|
|
20
21
|
displayOptions: {
|
|
21
22
|
show: {
|
|
22
|
-
resource: [
|
|
23
|
+
resource: [exports.resourceName],
|
|
23
24
|
operation: [exports.name],
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
function createProperties() {
|
|
29
|
-
return [(0, common_1.createOperationNotice)(
|
|
30
|
+
return [(0, common_1.createOperationNotice)(exports.resourceName, exports.name, 'DELETE'), createCrawlIdProperty()];
|
|
30
31
|
}
|
|
31
32
|
const { options, properties } = (0, common_1.buildApiProperties)(exports.name, exports.displayName, createProperties());
|
|
32
33
|
exports.options = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/cancelCrawl/index.ts"],"names":[],"mappings":";;;AACA,sCAAsE;AAEzD,QAAA,IAAI,GAAG,aAAa,CAAC;AACrB,QAAA,WAAW,GAAG,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Firecrawl/api/cancelCrawl/index.ts"],"names":[],"mappings":";;;AACA,sCAAsE;AAEzD,QAAA,IAAI,GAAG,aAAa,CAAC;AACrB,QAAA,WAAW,GAAG,oBAAoB,CAAC;AACnC,QAAA,YAAY,GAAG,UAAU,CAAC;AAEvC,SAAS,qBAAqB;IAC7B,OAAO;QACN,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE;YACR,OAAO,EAAE;gBACR,GAAG,EAAE,oBAAoB;aACzB;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,oBAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,YAAI,CAAC;aACjB;SACD;KACD,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB;IACxB,OAAO,CAAC,IAAA,8BAAqB,EAAC,oBAAY,EAAE,YAAI,EAAE,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC;AACvF,CAAC;AAED,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAA,2BAAkB,EAAC,YAAI,EAAE,mBAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAQjF,0BAAO;AAAE,gCAAU;AAN5B,OAAO,CAAC,OAAO,GAAG;IACjB,OAAO,EAAE;QACR,MAAM,EAAE,QAAQ;KAChB;CACD,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { INodeProperties, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export declare function extractUrls(val: unknown): string[];
|
|
3
|
+
export declare function convertToSchema(value: unknown): Record<string, unknown>;
|
|
2
4
|
export declare function formatOperationName(name: string): string;
|
|
3
5
|
export declare function createOperationNotice(resourceName: string, operationName: string, method?: string): INodeProperties;
|
|
4
6
|
export declare function createUrlProperty(operationName: string, defaultUrl?: string, resourceName?: string): INodeProperties;
|
|
5
|
-
export declare function createActionsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean): INodeProperties;
|
|
6
|
-
export declare function createLocationProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean): INodeProperties;
|
|
7
|
-
export declare function createIncludeTagsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean): INodeProperties;
|
|
7
|
+
export declare function createActionsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean, resourceName?: string): INodeProperties;
|
|
8
|
+
export declare function createLocationProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean, resourceName?: string): INodeProperties;
|
|
9
|
+
export declare function createIncludeTagsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean, resourceName?: string): INodeProperties;
|
|
8
10
|
export declare function createBatchUrlsProperty(operationName: string, defaultUrl?: string, resourceName?: string): INodeProperties;
|
|
9
|
-
export declare function createExcludeTagsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean): INodeProperties;
|
|
10
|
-
export declare function createScrapeOptionsProperty(operationName: string, useNestedScrapeOptions?: boolean, batchMode?: boolean): INodeProperties;
|
|
11
|
+
export declare function createExcludeTagsProperty(operationName: string, omitDisplayOptions?: boolean, useNestedScrapeOptions?: boolean, resourceName?: string): INodeProperties;
|
|
12
|
+
export declare function createScrapeOptionsProperty(operationName: string, useNestedScrapeOptions?: boolean, batchMode?: boolean, resourceName?: string): INodeProperties;
|
|
11
13
|
export declare function createOperationOption(name: string, action: string): INodePropertyOptions;
|
|
12
14
|
export declare function buildApiProperties(name: string, action: string, properties: INodeProperties[]): import("../helpers").IPropertiesWithOptions;
|