UNPKG

@brightdata/n8n-nodes-brightdata

Version:
79 lines 3.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BrightData = void 0; const n8n_workflow_1 = require("n8n-workflow"); const WebUnlockerDescription_1 = require("./WebUnlockerDescription"); const MarketplaceDatasetDescription_1 = require("./MarketplaceDatasetDescription"); const WebScrapperDescription_1 = require("./WebScrapperDescription"); const SearchFunctions_1 = require("./SearchFunctions"); class BrightData { constructor() { this.description = { displayName: 'BrightData', name: 'brightData', icon: 'file:brightdatasquared.svg', group: ['transform'], version: 1, subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', description: 'Interact with Bright Data to scrape websites or use existing datasets from the marketplace to generate adapted snapshots', defaults: { name: 'BrightData', }, usableAsTool: true, inputs: [n8n_workflow_1.NodeConnectionTypes.Main], outputs: [n8n_workflow_1.NodeConnectionTypes.Main], credentials: [ { name: 'brightdataApi', required: true, }, ], requestDefaults: { ignoreHttpStatusErrors: true, baseURL: 'https://api.brightdata.com', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, }, properties: [ { displayName: 'Resource', name: 'resource', type: 'options', noDataExpression: true, options: [ { name: 'Marketplace Dataset', value: 'marketplaceDataset', }, { name: 'Web Scraper', value: 'webScrapper', }, { name: 'Web Unlocker', value: 'webUnlocker', }, ], default: 'webUnlocker', }, ...WebUnlockerDescription_1.webUnlockerOperations, ...WebUnlockerDescription_1.webUnlockerFields, ...MarketplaceDatasetDescription_1.marketplaceDatasetOperations, ...MarketplaceDatasetDescription_1.marketplaceDatasetFields, ...WebScrapperDescription_1.webScrapperOperations, ...WebScrapperDescription_1.webScrapperFields, ], }; this.methods = { listSearch: { getActiveZones: SearchFunctions_1.getActiveZones, getCountries: SearchFunctions_1.getCountries, getDataSets: SearchFunctions_1.getDataSets, }, }; } } exports.BrightData = BrightData; //# sourceMappingURL=BrightData.node.js.map