/** * Airtop Node - Version 1.1 * Discriminator: resource=extraction, operation=query */ interface Credentials { airtopApi: CredentialReference; } /** Query a page to extract data or ask a question given the data on the page */ export type AirtopV11ExtractionQueryParams = { resource: 'extraction'; operation: 'query'; /** * Choose between creating a new session or using an existing one * @default existing */ sessionMode?: 'new' | 'existing' | Expression; /** * The ID of the <a href="https://docs.airtop.ai/guides/how-to/creating-a-session" target="_blank">Session</a> to use * @displayOptions.show { sessionMode: ["existing"] } * @default ={{ $json["sessionId"] }} */ sessionId?: string | Expression | PlaceholderValue; /** * The ID of the <a href="https://docs.airtop.ai/guides/how-to/creating-a-session#windows" target="_blank">Window</a> to use * @displayOptions.show { sessionMode: ["existing"] } * @default ={{ $json["windowId"] }} */ windowId?: string | Expression | PlaceholderValue; /** * URL to load in the window * @displayOptions.show { sessionMode: ["new"] } */ url?: string | Expression | PlaceholderValue; /** * The name of the Airtop profile to load or create * @hint <a href="https://docs.airtop.ai/guides/how-to/saving-a-profile" target="_blank">Learn more</a> about Airtop profiles * @displayOptions.show { sessionMode: ["new"] } */ profileName?: string | Expression | PlaceholderValue; /** * Whether to terminate the session after the operation is complete. When disabled, you must manually terminate the session. By default, idle sessions timeout after 10 minutes * @displayOptions.show { sessionMode: ["new"] } * @default true */ autoTerminateSession?: boolean | Expression; /** * The prompt to query the page content */ prompt?: string | Expression | PlaceholderValue; /** * Additional Fields * @default {} */ additionalFields?: { /** JSON schema defining the structure of the output * @hint If you want to force your output to be JSON, provide a valid JSON schema describing the output. You can generate one automatically in the <a href="https://portal.airtop.ai/" target="_blank">Airtop API Playground</a>. */ outputSchema?: IDataObject | string | Expression; /** Whether to parse the model's response to JSON in the output. Requires the 'JSON Output Schema' parameter to be set. * @default true */ parseJsonOutput?: boolean | Expression; /** Whether to analyze the web page visually when fulfilling the request * @default false */ includeVisualAnalysis?: boolean | Expression; }; }; export type AirtopV11ExtractionQueryOutput = { data?: { modelResponse?: string; }; meta?: { requestId?: string; status?: string; usage?: { credits?: number; id?: string; }; }; warnings?: Array<{ message?: string; }>; }; export type AirtopV11ExtractionQueryNode = { type: 'n8n-nodes-base.airtop'; version: 1.1; credentials?: Credentials; config: NodeConfig; output?: Items; };