firecrawl 1.8.2 → 1.8.3
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/index.cjs +3 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/src/index.ts +4 -2
package/dist/index.cjs
CHANGED
|
@@ -292,11 +292,12 @@ var FirecrawlApp = class {
|
|
|
292
292
|
* @param params - Additional parameters for the scrape request.
|
|
293
293
|
* @param pollInterval - Time in seconds for job status checks.
|
|
294
294
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
295
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
295
296
|
* @returns The response from the crawl operation.
|
|
296
297
|
*/
|
|
297
|
-
async batchScrapeUrls(urls, params, pollInterval = 2, idempotencyKey) {
|
|
298
|
+
async batchScrapeUrls(urls, params, pollInterval = 2, idempotencyKey, webhook) {
|
|
298
299
|
const headers = this.prepareHeaders(idempotencyKey);
|
|
299
|
-
let jsonData = { urls, ...params ?? {} };
|
|
300
|
+
let jsonData = { urls, ...params ?? {}, webhook };
|
|
300
301
|
try {
|
|
301
302
|
const response = await this.postRequest(
|
|
302
303
|
this.apiUrl + `/v1/batch/scrape`,
|
package/dist/index.d.cts
CHANGED
|
@@ -303,9 +303,10 @@ declare class FirecrawlApp {
|
|
|
303
303
|
* @param params - Additional parameters for the scrape request.
|
|
304
304
|
* @param pollInterval - Time in seconds for job status checks.
|
|
305
305
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
306
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
306
307
|
* @returns The response from the crawl operation.
|
|
307
308
|
*/
|
|
308
|
-
batchScrapeUrls(urls: string[], params?: ScrapeParams, pollInterval?: number, idempotencyKey?: string): Promise<BatchScrapeStatusResponse | ErrorResponse>;
|
|
309
|
+
batchScrapeUrls(urls: string[], params?: ScrapeParams, pollInterval?: number, idempotencyKey?: string, webhook?: CrawlParams["webhook"]): Promise<BatchScrapeStatusResponse | ErrorResponse>;
|
|
309
310
|
asyncBatchScrapeUrls(urls: string[], params?: ScrapeParams, idempotencyKey?: string): Promise<BatchScrapeResponse | ErrorResponse>;
|
|
310
311
|
/**
|
|
311
312
|
* Initiates a batch scrape job and returns a CrawlWatcher to monitor the job via WebSocket.
|
package/dist/index.d.ts
CHANGED
|
@@ -303,9 +303,10 @@ declare class FirecrawlApp {
|
|
|
303
303
|
* @param params - Additional parameters for the scrape request.
|
|
304
304
|
* @param pollInterval - Time in seconds for job status checks.
|
|
305
305
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
306
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
306
307
|
* @returns The response from the crawl operation.
|
|
307
308
|
*/
|
|
308
|
-
batchScrapeUrls(urls: string[], params?: ScrapeParams, pollInterval?: number, idempotencyKey?: string): Promise<BatchScrapeStatusResponse | ErrorResponse>;
|
|
309
|
+
batchScrapeUrls(urls: string[], params?: ScrapeParams, pollInterval?: number, idempotencyKey?: string, webhook?: CrawlParams["webhook"]): Promise<BatchScrapeStatusResponse | ErrorResponse>;
|
|
309
310
|
asyncBatchScrapeUrls(urls: string[], params?: ScrapeParams, idempotencyKey?: string): Promise<BatchScrapeResponse | ErrorResponse>;
|
|
310
311
|
/**
|
|
311
312
|
* Initiates a batch scrape job and returns a CrawlWatcher to monitor the job via WebSocket.
|
package/dist/index.js
CHANGED
|
@@ -256,11 +256,12 @@ var FirecrawlApp = class {
|
|
|
256
256
|
* @param params - Additional parameters for the scrape request.
|
|
257
257
|
* @param pollInterval - Time in seconds for job status checks.
|
|
258
258
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
259
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
259
260
|
* @returns The response from the crawl operation.
|
|
260
261
|
*/
|
|
261
|
-
async batchScrapeUrls(urls, params, pollInterval = 2, idempotencyKey) {
|
|
262
|
+
async batchScrapeUrls(urls, params, pollInterval = 2, idempotencyKey, webhook) {
|
|
262
263
|
const headers = this.prepareHeaders(idempotencyKey);
|
|
263
|
-
let jsonData = { urls, ...params ?? {} };
|
|
264
|
+
let jsonData = { urls, ...params ?? {}, webhook };
|
|
264
265
|
try {
|
|
265
266
|
const response = await this.postRequest(
|
|
266
267
|
this.apiUrl + `/v1/batch/scrape`,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -543,16 +543,18 @@ export default class FirecrawlApp {
|
|
|
543
543
|
* @param params - Additional parameters for the scrape request.
|
|
544
544
|
* @param pollInterval - Time in seconds for job status checks.
|
|
545
545
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
546
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
546
547
|
* @returns The response from the crawl operation.
|
|
547
548
|
*/
|
|
548
549
|
async batchScrapeUrls(
|
|
549
550
|
urls: string[],
|
|
550
551
|
params?: ScrapeParams,
|
|
551
552
|
pollInterval: number = 2,
|
|
552
|
-
idempotencyKey?: string
|
|
553
|
+
idempotencyKey?: string,
|
|
554
|
+
webhook?: CrawlParams["webhook"],
|
|
553
555
|
): Promise<BatchScrapeStatusResponse | ErrorResponse> {
|
|
554
556
|
const headers = this.prepareHeaders(idempotencyKey);
|
|
555
|
-
let jsonData: any = { urls, ...(params ?? {}) };
|
|
557
|
+
let jsonData: any = { urls, ...(params ?? {}), webhook };
|
|
556
558
|
try {
|
|
557
559
|
const response: AxiosResponse = await this.postRequest(
|
|
558
560
|
this.apiUrl + `/v1/batch/scrape`,
|