Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
91 lines
2.1 KiB
TypeScript
91 lines
2.1 KiB
TypeScript
import { NodeConnectionTypes } from 'n8n-workflow';
|
|
import type { IExecuteFunctions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
|
|
import * as agent from './actions/agent/Agent.resource';
|
|
import * as extraction from './actions/extraction/Extraction.resource';
|
|
import * as file from './actions/file/File.resource';
|
|
import * as interaction from './actions/interaction/Interaction.resource';
|
|
import { router } from './actions/router';
|
|
import * as session from './actions/session/Session.resource';
|
|
import * as window from './actions/window/Window.resource';
|
|
import { agentsResourceMapping, listSearchAgents } from './methods';
|
|
|
|
export class Airtop implements INodeType {
|
|
description: INodeTypeDescription = {
|
|
displayName: 'Airtop',
|
|
name: 'airtop',
|
|
icon: 'file:airtop.svg',
|
|
group: ['transform'],
|
|
defaultVersion: 1,
|
|
version: [1, 1.1],
|
|
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
|
|
description: 'Scrape and control any site with Airtop',
|
|
usableAsTool: true,
|
|
defaults: {
|
|
name: 'Airtop',
|
|
},
|
|
inputs: [NodeConnectionTypes.Main],
|
|
outputs: [NodeConnectionTypes.Main],
|
|
credentials: [
|
|
{
|
|
name: 'airtopApi',
|
|
required: true,
|
|
},
|
|
],
|
|
properties: [
|
|
{
|
|
displayName: 'Resource',
|
|
name: 'resource',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
options: [
|
|
{
|
|
name: 'Agent',
|
|
value: 'agent',
|
|
},
|
|
{
|
|
name: 'Extraction',
|
|
value: 'extraction',
|
|
},
|
|
{
|
|
name: 'File',
|
|
value: 'file',
|
|
},
|
|
{
|
|
name: 'Interaction',
|
|
value: 'interaction',
|
|
},
|
|
{
|
|
name: 'Session',
|
|
value: 'session',
|
|
},
|
|
{
|
|
name: 'Window',
|
|
value: 'window',
|
|
},
|
|
],
|
|
default: 'session',
|
|
},
|
|
...agent.description,
|
|
...session.description,
|
|
...window.description,
|
|
...file.description,
|
|
...extraction.description,
|
|
...interaction.description,
|
|
],
|
|
};
|
|
|
|
methods = {
|
|
listSearch: {
|
|
listSearchAgents,
|
|
},
|
|
resourceMapping: {
|
|
agentsResourceMapping,
|
|
},
|
|
};
|
|
|
|
async execute(this: IExecuteFunctions) {
|
|
return await router.call(this);
|
|
}
|
|
}
|