import { $r as HttpBasicAuthCredentials, Kr as HttpSslAuthCredentials, Yr as HttpHeaderAuthCredentials, kn as NasaApiCredentials, kr as JwtAuthCredentials, t as N8nCredentialsUnion } from "./generated-Crs8g3eR.cjs"; import { Type } from "arktype"; import { UserConfig } from "tsdown"; //#region src/credentials/crendentials.d.ts type CredentialsByName = Extract; declare class Credentials { /** @internal */ readonly id: string; /** @internal */ readonly hashId: string; readonly type: N["__name"]; readonly infer: N; /** Undefined until we know the id */ n8nCredentialsId: string | undefined; private constructor(); static byId>(props: { id: string; name: Name; }): Credentials; } //#endregion //#region src/bundler/function.d.ts interface BundledFunctionProps { /** * Path containing the entrypoint file */ projectRoot: string; /** * Path to the entrypoint file (relative to `projectRoot`) * @default "main.py" for Python and "index.ts" or "index.js" for Node.js */ entrypoint?: string; /** * Main function name * @default "handler" */ mainFunctionName?: string; /** * Parameters to call the main function with */ input?: Record; } declare abstract class BundledFunction { readonly props: BundledFunctionProps; protected readonly entrypoint: string; protected readonly id: string; protected readonly name: string; protected readonly expressionPrefix: ExpressionPrefix; protected possibleEntrypoints: string[]; protected constructor(props: BundledFunctionProps, { possibleEntrypoints }?: { possibleEntrypoints?: string[]; }); /** * @internal * Bundles the function */ abstract bundle(): Promise; protected getBundledFile(outDir: string): string; private findEntrypoint; protected prepareHandleParameters(): string; } //#endregion //#region src/bundler/nodejs-function.d.ts interface NodejsFunctionProps extends BundledFunctionProps { /** * Bundler options */ bundlerOptions?: UserConfig; /** * Installation command * @default ["npm", ["ci"]] */ installCommand?: [string, string[]]; } declare class NodejsFunction extends BundledFunction { props: NodejsFunctionProps; private readonly installCommand; private constructor(); static from(props: NodejsFunctionProps): NodejsFunction; getBundledFile(outDir: string): string; bundle(): Promise; private installDeps; } //#endregion //#region src/bundler/python-function.d.ts interface PythonFunctionProps extends BundledFunctionProps {} declare class PythonFunction extends BundledFunction { protected expressionPrefix: ExpressionPrefix; private constructor(); static from(props: PythonFunctionProps): PythonFunction; bundle(): Promise; } //#endregion //#region src/generated/nodes/Code.d.ts interface CodeNodeParameters { /** Default: "runOnceForAllItems" */ readonly mode?: "runOnceForAllItems" | "runOnceForEachItem"; /** Default: "javaScript" */ readonly language?: "javaScript" | "pythonNative"; /** * JavaScript code to execute.

Tip: You can use luxon vars like $today for dates and $jmespath for querying JSON structures. Learn more. * Type options: {"editor":"codeNodeEditor","editorLanguage":"javaScript"} */ readonly jsCode?: string; /** * Python code to execute.

Tip: You can use built-in methods and variables like _today for dates and _jmespath for querying JSON structures. Learn more. * Type options: {"editor":"codeNodeEditor","editorLanguage":"python"} */ readonly pythonCode?: string; } //#endregion //#region src/utils/types.d.ts type Prettify = { [K in keyof T]: T[K] } & {}; type Writeable = { -readonly [P in keyof T]: Writeable }; type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? Prettify : never; type RequireFields = T & Required>; type AnyString = string & {}; type IsNever = [T] extends [never] ? true : false; type IsAny = 0 extends 1 & T ? true : false; type IsUnknown = IsAny extends true ? false : unknown extends T ? true : false; type IsNullable = IsNever extends true ? false : T extends null ? true : false; type Primitive = string | number | boolean | bigint | symbol | null | undefined; type NeedsBrackets = T extends `${any}.${any}` | `${any} ${any}` | `${any}-${any}` ? true : false; type FormatWithPrefix = NeedsBrackets extends true ? `${Prefix}['${T}']` : Prefix extends "" ? T : `${Prefix}.${T}`; type NumberStr = `${number}`; type JoinKeys = { [K in keyof T]: IsNever extends true ? never : T[K] extends Function ? `${Prefix}${Extract}` : T[K] extends Primitive | Date ? FormatWithPrefix, Prefix> : T[K] extends Array ? FormatWithPrefix, Prefix> | JoinKeys, Prefix>}[${NumberStr}]`> : T[K] extends object ? FormatWithPrefix, Prefix> | JoinKeys, Prefix>> : FormatWithPrefix, Prefix> }[keyof T]; type RecursiveDotNotation = Path extends `['${infer Key}']${infer Rest}` ? Key extends keyof T ? Rest extends "" ? T[Key] : Rest extends `['${string}']${string}` ? RecursiveDotNotation : Rest extends `.${infer DotRest}` ? RecursiveDotNotation : never : never : Path extends `${infer Key}.${infer Rest}` ? Key extends `${infer ArrayKey}[${string}]` ? ArrayKey extends keyof T ? T[ArrayKey] extends readonly (infer U)[] ? RecursiveDotNotation : never : never : Key extends keyof T ? RecursiveDotNotation : never : Path extends `${infer ArrayKey}[${infer Rest}]` ? ArrayKey extends keyof T ? T[ArrayKey] extends readonly (infer U)[] ? U : RecursiveDotNotation : never : Path extends keyof T ? T[Path] : Path extends `'${infer Rest}'` ? Rest extends keyof T ? T[Rest] : never : never; type TypeOfField> = IsAny extends true ? any : RecursiveDotNotation; /** "Hair Space" character, used as a non-rendered sentinel for an error message string: * https://www.compart.com/en/unicode/U+200A */ declare const zeroWidthSpace = "\u200A"; /** "Hair Space" character, used as a non-rendered sentinel for an error message string: * https://www.compart.com/en/unicode/U+200A */ type ZeroWidthSpace = typeof zeroWidthSpace; type ErrorMessage = `${message}${ZeroWidthSpace}`; //#endregion //#region src/workflow/chain/state.d.ts declare abstract class State implements IChainable, INextable { /** * @internal */ "~context": T; /** * Unique identifier for this state */ readonly id: LiteralId; /** * @internal */ readonly startState: State; /** * @internal */ abstract readonly endStates: INextable[]; /** * @internal */ protected readonly nextStates: IChainable[]; /** * Connection configuration options for connected state * keyed by state ID */ protected connectionsOptions: Record; constructor(id: LiteralId); /** @internal */ "~getConnectionOptions"(id: string): Required; /** * Determines if this state can accept input from another state * @param _fromState - The state that wants to connect to this state * @param _withConnectionOptions - Optional connection configuration * @returns True if this state can accept the input, false otherwise */ canTakeInput(_fromState: IChainable, _withConnectionOptions?: ConnectionOptions): boolean; /** @internal */ addNext(state: IChainable, connectionOptions?: ConnectionOptions): void; /** * Returns all states that are connected as next states from this state * @returns Array of chainable states that follow this state */ listOutgoing(): IChainable[]; } //#endregion //#region src/workflow/chain/types.d.ts interface ConnectionOptions { /** * From which input to connect * Example: If nodes have a true/false output, true is 0, false is 1 * @default 0 */ from?: number; /** * To which output to connect * Example: Merge nodes have two inputs, top is 0, bottom is 1 * @default 0 */ to?: number; /** * @internal * The type of connection * @default "main" */ type?: "main" | AnyString; /** * @internal * @default "output" */ direction?: "input" | "output"; } /** * Interface for states that can have 'next' states * @internal */ interface INextable { addNext(state: IChainable, connectionOptions?: ConnectionOptions): void; } interface Identifiable { /** * Descriptive identifier for this element */ readonly id: Id; } /** * Interface for objects that can be used in a Chain * @internal */ interface IChainable extends Identifiable { /** * The start state of this chainable */ readonly startState: State; /** * The chainable end state(s) of this chainable */ readonly endStates: INextable[]; /** * @internal * Trick TS to make sure that the context type is conserved */ readonly "~context": C; } /** @hidden */ type IContext = any; //#endregion //#region src/workflow/resolved-workflow.d.ts declare abstract class ResolvedWorkflow { private n8nWorkflowId; private hashId; isResolved(): boolean; getN8nWorkflowId(): string | undefined; setN8nWorkflowId(id: string): void; getHashId(): string | undefined; setHashId(id: string): void; getInternalId(): string; toWorkflowId(): string; } //#endregion //#region src/workflow/tag.d.ts interface Tag { name: string; id?: string; createdAt?: string; updatedAt?: string; } //#endregion //#region src/workflow/workflow.d.ts type WorkflowDefinitionProvider = T | ((workflow: Workflow) => T) | Array | ((workflow: Workflow) => Array); interface WorkflowProps { name?: string; definition: WorkflowDefinitionProvider | Node>; tags?: string[] | undefined; active?: boolean; /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ outputSchema?: Output; /** Input schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ inputSchema?: Input; settings?: { /** * @default "v1" */ executionOrder?: "v1" | "v2"; timezone?: string; /** * @default "all" */ saveDataErrorExecution?: "all" | "none"; /** * @default "all" */ saveDataSuccessExecution?: "all" | "none"; /** * @default true */ saveExecutionProgress?: boolean; /** * @default true */ saveManualExecutions?: boolean; callerPolicy?: "workflowsFromSameOwner"; /** * In seconds * @default undefined */ executionTimeout?: number | undefined; }; } declare class Workflow extends ResolvedWorkflow { readonly props: WorkflowProps; /** @internal */ static readonly [WORKFLOW_SYMBOL] = true; /** @internal */ readonly [WORKFLOW_SYMBOL] = true; readonly id: string; private readonly tags; /** * @internal */ "~cachedDefinition"?: Array | Node>; private dynamicalyAddedNodes; constructor(app: App, id: string, props: WorkflowProps); static import(app: App, props: ImportedWorkflowProps): ImportedWorkflow; addToDynamicalyAddedNodes(node: Node): void; getName(): string; getDefinition(): (Node | Chain)[]; getNodes(): Node[]; build(): Promise<{ id: string; name: string; nodes: { id: any; name: string; type: string; position: NodePosition | undefined; typeVersion: number; parameters: {} | undefined; credentials: { [type: string]: { id: string; }; } | undefined; disabled: boolean | undefined; retryOnFail: boolean | undefined; maxTries: number | undefined; executeOnce: boolean | undefined; alwaysOutputData: boolean | undefined; notes: string | undefined; notesInFlow: boolean | undefined; onError: "continueRegularOutput" | "continueErrorOutput" | undefined; }[]; connections: Record; settings: { /** * @default "v1" */ executionOrder?: "v1" | "v2"; timezone?: string; /** * @default "all" */ saveDataErrorExecution?: "all" | "none"; /** * @default "all" */ saveDataSuccessExecution?: "all" | "none"; /** * @default true */ saveExecutionProgress?: boolean; /** * @default true */ saveManualExecutions?: boolean; callerPolicy?: "workflowsFromSameOwner"; /** * In seconds * @default undefined */ executionTimeout?: number | undefined; }; active: boolean; tags: Tag[]; }>; private buildTags; /** * Should only be used with `typeof` * Returns null. */ getInputType(): Input["infer"]; getInputSchema(): Input | null; /** * Should only be used with `typeof` * Returns null. */ getOutputType(): Output["infer"]; getOutputSchema(): Output | null; getInternalId(): string; /** @internal */ "~validate"(): void; } type WorkflowDefinition = Awaited>; /** @internal */ declare const workflowTagId: (id: string) => string; /** @internal */ declare const RESOLVED_WORKFLOW_ID_PREFIX: string; /** @internal */ declare const RESOLVED_WORKFLOW_ID: (workflowId: string) => string; //#endregion //#region src/workflow/imported-workflow.d.ts interface ImportedWorkflowProps extends Pick, "inputSchema" | "outputSchema" | "name"> { /** * Id of the workflow generated by n8n-kit (used in tags or visible in the CLI tables) * * Use this if you want the CLI to resolve the workflow id automatically */ hashId?: string; /** * Id of the workflow in n8n */ n8nWorkflowId?: string; } declare class ImportedWorkflow extends ResolvedWorkflow { readonly props: ImportedWorkflowProps; static readonly [IMPORTED_WORKFLOW_SYMBOL] = true; readonly [IMPORTED_WORKFLOW_SYMBOL] = true; constructor(app: App, props: ImportedWorkflowProps); getName(): string; } //#endregion //#region src/symbols.d.ts declare const NODE_SYMBOL: unique symbol; declare const isNode: (node: any) => node is Node; declare const GROUP_SYMBOL: unique symbol; declare const isGroup: (node: any) => node is Group; declare const WORKFLOW_SYMBOL: unique symbol; declare const isWorkflow: (node: any) => node is Workflow; declare const IMPORTED_WORKFLOW_SYMBOL: unique symbol; declare const isImportedWorkflow: (node: any) => node is ImportedWorkflow; //#endregion //#region src/nodes/node.d.ts /** * Position of the node in the n8n workflow editor. */ type NodePosition = [x: number, y: number]; /** * Size of the node in the n8n workflow editor. * @default DEFAULT_NODE_SIZE */ interface NodeSize { width?: number; height?: number; } type NodeProps = { label?: string; parameters?: unknown; position?: NodePosition; /** * If true, the node won't run but subsequent nodes WILL be executed * @default false */ disabled?: boolean; /** * If active, the node tries to execute again when it fails * @default false */ retryOnFail?: boolean; /** * Number of times to attempt to execute the node before failing the execution * Enabled if `retryOnFail` is true * @default 3 */ maxTries?: number; /** * If active, the node executes only once, with data from the first item it receives * @default false */ executeOnce?: boolean; alwaysOutputData?: boolean; /** * Optional note to save with the node * @default undefined */ notes?: string; notesInFlow?: boolean; /** * Action to take when the node execution fails * When undefined, an error will stop the workflow execution * @default undefined */ onError?: "continueRegularOutput" | "continueErrorOutput"; }; declare abstract class Node extends State { /** * Reference to the workflow that contains this node * @internal */ protected workflowParent?: Workflow; /** @internal */ static readonly [NODE_SYMBOL] = true; /** @internal */ readonly [NODE_SYMBOL] = true; /** * The node label */ readonly label: string | undefined; /** * The n8n node type identifier (e.g., 'n8n-nodes-base.httpRequest') */ protected abstract readonly type: string; /** * Version of the node type implementation */ protected abstract typeVersion: number; /** * Position of the node in the n8n workflow editor canvas * When undefined, the node will be placed automatically * @default undefined */ position?: NodePosition; /** * Size of the node in the n8n workflow editor * @default DEFAULT_NODE_SIZE */ size: NodeSize; /** * Array of group IDs this node belongs to * @internal */ groupIds: string[]; /** * Node configuration properties including execution settings and metadata */ readonly props?: NodeProps; readonly endStates: INextable[]; /** * Retrieves the parameters configured for this node * @returns The node parameters or undefined if none are set */ getParameters(): Promise<{} | undefined>; /** * Returns the credentials required by this node * @returns Array of credentials or undefined if no credentials are needed */ getCredentials(): Array | undefined> | undefined; constructor(id: LiteralId, props?: NodeProps); /** @internal */ "~setParent"(parent: Workflow): void; /** @internal */ "~setGroup"(groupId: string): void; /** @internal */ "~validate"(): void; /** * Gets the full path of this node including its parent workflow * @returns The path in format "workflowId/nodeId" or "none/nodeId" if no parent */ getPath(): string; /** * Gets the display label for this node * @returns The configured label or the node ID if no label is set */ getLabel(): string; private credentialsToNode; /** * Creates a deep copy of this node with a new ID and optional property overrides * @param id - The new unique identifier for the cloned node * @param props - Optional properties to override in the cloned node * @param cloneOptions.preserveChainConnections - If true, keeps the chain connections intact * @returns A new node instance with the specified ID */ clone(id: Id, props?: NodeProps, cloneOptions?: { preserveChainConnections?: boolean; }): Omit & Node; /** * @returns The node data in n8n's expected format */ toNode(): Promise<{ id: LiteralId; name: string; type: string; position: NodePosition | undefined; typeVersion: number; parameters: {} | undefined; credentials: { [type: string]: { id: string; }; } | undefined; disabled: boolean | undefined; retryOnFail: boolean | undefined; maxTries: number | undefined; executeOnce: boolean | undefined; alwaysOutputData: boolean | undefined; notes: string | undefined; notesInFlow: boolean | undefined; onError: "continueRegularOutput" | "continueErrorOutput" | undefined; }>; } //#endregion //#region src/generated/nodes-impl/Code.d.ts interface CodeProps$1 extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: CodeNodeParameters; } /** * Run custom JavaScript or Python code */ declare class Code$1 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.code"; protected typeVersion: 2; constructor(id: L, props?: P | undefined); } //#endregion //#region src/nodes/code.d.ts interface CodeProps extends Omit { parameters: (Omit & { language?: "javaScript"; jsCode: string | NodejsFunction; pythonCode?: never; }) | (Omit & { language?: "pythonNative"; pythonCode: string | PythonFunction; jsCode?: never; }); } declare class Code extends Code$1 { props: P; constructor(id: L, props: P); "~validate"(): void; getParameters(): Promise; } //#endregion //#region src/generated/nodes/ExecuteWorkflowTrigger.d.ts interface ExecuteWorkflowTriggerNodeParameters { /** Default: "workflowInputs" */ readonly inputSource?: "workflowInputs" | "jsonExample" | "passthrough"; /** Default: "{\n \"aField\": \"a string\",\n \"aNumber\": 123,\n \"thisFieldAcceptsAnyType\": null,\n \"anArray\": []\n}" */ readonly jsonExample?: string; /** * Define expected input fields. If no inputs are provided, all data from the calling workflow will be passed through. * Default: {} * Type options: {"multipleValues":true,"sortable":true,"minRequiredFields":1} */ readonly workflowInputs?: { values: Array<{ name: string; type: "any" | "string" | "number" | "boolean" | "array" | "object"; }>; }; } //#endregion //#region src/generated/nodes-impl/ExecuteWorkflowTrigger.d.ts interface ExecuteWorkflowTriggerProps$1 extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: ExecuteWorkflowTriggerNodeParameters; } /** * Helpers for calling other n8n workflows. Used for designing modular, microservice-like workflows. */ declare class ExecuteWorkflowTrigger$1 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.executeWorkflowTrigger"; protected typeVersion: 1.1; constructor(id: L, props?: P | undefined); } //#endregion //#region src/nodes/execute-workflow-trigger.d.ts interface ExecuteWorkflowTriggerProps extends NodeProps { parameters?: Omit; } declare class ExecuteWorkflowTrigger extends ExecuteWorkflowTrigger$1 { private readonly workflow; props: ExecuteWorkflowTriggerProps; constructor(workflow: Workflow, id: L, props: ExecuteWorkflowTriggerProps); buildWorkflowInputsSchema(): { values: { name: string; type: string; }[]; } | undefined; getParameters(): Promise<{ workflowInputs: { values: { name: string; type: string; }[]; } | undefined; inputSource?: "workflowInputs" | "jsonExample" | "passthrough"; jsonExample?: string; }>; } //#endregion //#region src/generated/nodes/ExecuteWorkflow.d.ts interface ExecuteWorkflowNodeParameters { /** * Where to get the workflow to execute from * Default: "database" */ readonly source?: "database" | "localFile" | "parameter" | "url" | "database" | "parameter"; /** Note on using an expression here: if this node is set to run once with all items, they will all be sent to the same workflow. That workflow's ID will be calculated by evaluating the expression for the first input item. */ readonly workflowId?: string; /** The path to local JSON workflow file to execute */ readonly workflowPath?: string; /** * The workflow JSON code to execute * Default: "\n\n\n" * Type options: {"rows":10} */ readonly workflowJson?: string; /** The URL from which to load the workflow from */ readonly workflowUrl?: string; /** Default: "once" */ readonly mode?: "once" | "each"; /** Default: {} */ readonly options?: { waitForSubWorkflow?: boolean; }; } //#endregion //#region src/generated/nodes-impl/ExecuteWorkflow.d.ts interface ExecuteWorkflowProps$1 extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: ExecuteWorkflowNodeParameters; } /** * Execute another workflow */ declare class ExecuteWorkflow$1 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.executeWorkflow"; protected typeVersion: 1.3; constructor(id: L, props?: P | undefined); } //#endregion //#region src/nodes/execute-workflow.d.ts interface ExecuteWorkflowProps extends NodeProps { parameters: Omit & { workflow: Workflow | ImportedWorkflow; workflowInputs: ExpressionOrValue | Record | JsonExpression; }; } declare class ExecuteWorkflow extends ExecuteWorkflow$1 { props: ExecuteWorkflowProps; constructor(id: L, props: ExecuteWorkflowProps); private formatWorkflowInput; getParameters(): Promise<{ workflowInputs: { mappingMode: string; value: Record | ExpressionOrValue | JsonExpression; matchingColumns: never[]; schema: never[]; }; workflow: undefined; workflowId: { __rl: boolean; value: string; mode: string; cachedResultName: string; }; source: string; workflowPath?: string; workflowJson?: string; workflowUrl?: string; mode?: "once" | "each"; options?: { waitForSubWorkflow?: boolean; }; }>; } //#endregion //#region src/generated/nodes/SetV2.d.ts interface SetV2NodeParameters { /** Default: "manual" */ readonly mode?: "manual" | "raw"; /** Whether this item should be duplicated a set number of times */ readonly duplicateItem?: boolean; /** * How many times the item should be duplicated, mainly used for testing and debugging * Type options: {"minValue":0} */ readonly duplicateCount?: number; /** * Default: "{\n \"my_field_1\": \"value\",\n \"my_field_2\": 1\n}\n" * Type options: {"rows":5} */ readonly jsonOutput?: string; /** * Edit existing fields or add new ones to modify the output data * Default: {} * Type options: {"multipleValues":true,"sortable":true} */ readonly fields?: { values: Array<{ name?: string; type?: "stringValue" | "numberValue" | "booleanValue" | "arrayValue" | "objectValue"; stringValue?: string; numberValue?: string; booleanValue?: "true" | "false"; arrayValue?: string; objectValue?: string; }>; }; /** Default: {} */ readonly assignments?: unknown; /** * How to select the fields you want to include in your output items * Default: "all" */ readonly include?: "all" | "none" | "selected" | "except" | "all" | "selected" | "except"; /** Whether to pass to the output all the input fields (along with the fields set in 'Fields to Set') */ readonly includeOtherFields?: boolean; /** Comma-separated list of the field names you want to include in the output. You can drag the selected fields from the input panel. */ readonly includeFields?: string; /** Comma-separated list of the field names you want to exclude from the output. You can drag the selected fields from the input panel. */ readonly excludeFields?: string; /** Default: {} */ readonly options?: { includeBinary?: boolean; stripBinary?: boolean; ignoreConversionErrors?: boolean; dotNotation?: boolean; }; } //#endregion //#region src/generated/nodes-impl/SetV2.d.ts interface SetV2Props extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: SetV2NodeParameters; } /** * Modify, add, or remove item fields */ declare class SetV2 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.set"; protected typeVersion: 3.4; constructor(id: L, props?: P | undefined); } //#endregion //#region src/nodes/fields.d.ts type Assignment = { id?: string; name: string; type: T; value: ExpressionOrValue; }; interface SetProps extends NodeProps { parameters: Omit & { assignments: { assignments: A; }; }; } type IsValidValue = V extends ExpressionBuilder ? VType extends T["infer"] ? true : false : V extends T["infer"] ? true : false; type AssignmentsToObject = { [K in keyof T]: T[K] extends { name: infer N extends string; type: infer T extends Type; value: infer V; } ? { [K in N]: IsValidValue extends true ? T["infer"] : never } : never }[number]; declare class Fields> extends SetV2>> { props: P; constructor(id: L, props: P); "~validate"(): void; } //#endregion //#region src/generated/nodes/HttpRequestV3.d.ts interface HttpRequestV3NodeParameters { /** * The request method to use * Default: "GET" */ readonly method?: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT"; /** The URL to make the request to */ readonly url?: string; /** Default: "none" */ readonly authentication?: "none" | "predefinedCredentialType" | "genericCredentialType"; readonly nodeCredentialType?: N8nCredentialsUnion["__name"]; readonly genericAuthType?: N8nCredentialsUnion["__name"]; readonly provideSslCertificates?: boolean; /** Whether the request has query params or not */ readonly sendQuery?: boolean; /** Default: "keypair" */ readonly specifyQuery?: "keypair" | "json"; /** * Default: {"parameters":[{"name":"","value":""}]} * Type options: {"multipleValues":true,"fixedCollection":{"itemTitle":"={{ $collection.item.value.name }}"}} */ readonly queryParameters?: { parameters: Array<{ name?: string; value?: string; }>; }; readonly jsonQuery?: string; /** Whether the request has headers or not */ readonly sendHeaders?: boolean; /** Default: "keypair" */ readonly specifyHeaders?: "keypair" | "json"; /** * Default: {"parameters":[{"name":"","value":""}]} * Type options: {"multipleValues":true,"fixedCollection":{"itemTitle":"={{ $collection.item.value.name }}"}} */ readonly headerParameters?: { parameters: Array<{ name?: string; value?: string; }>; }; readonly jsonHeaders?: string; /** Whether the request has a body or not */ readonly sendBody?: boolean; /** * Content-Type to use to send body parameters * Default: "json" */ readonly contentType?: "form-urlencoded" | "multipart-form-data" | "json" | "binaryData" | "raw"; /** * The body can be specified using explicit fields (keypair) or using a JavaScript object (json) * Default: "keypair" */ readonly specifyBody?: "keypair" | "json" | "keypair" | "string"; /** * Default: {"parameters":[{"name":"","value":""}]} * Type options: {"multipleValues":true,"fixedCollection":{"itemTitle":"={{ $collection.item.value.name }}"}} */ readonly bodyParameters?: { parameters: Array<{ name?: string; value?: string; }>; } | { parameters: Array<{ parameterType?: "formBinaryData" | "formData"; name?: string; value?: string; inputDataFieldName?: string; }>; }; readonly jsonBody?: string; readonly body?: string; /** The name of the incoming field containing the binary file data to be processed */ readonly inputDataFieldName?: string; readonly rawContentType?: string; /** Default: {} */ readonly options?: { batching?: { batch: { batchSize?: number; batchInterval?: number; }; }; allowUnauthorizedCerts?: boolean; queryParameterArrays?: "repeat" | "brackets" | "indices"; lowercaseHeaders?: boolean; redirect?: { redirect: { followRedirects?: boolean; maxRedirects?: number; }; }; response?: { response: { fullResponse?: boolean; neverError?: boolean; responseFormat?: "autodetect" | "file" | "json" | "text"; outputPropertyName: string; }; }; pagination?: { pagination: { paginationMode?: "off" | "updateAParameterInEachRequest" | "responseContainsNextURL"; webhookNotice?: string; nextURL?: string; parameters?: { parameters: Array<{ type?: "body" | "headers" | "qs"; name?: string; value?: string; }>; }; paginationCompleteWhen?: "responseIsEmpty" | "receiveSpecificStatusCodes" | "other"; statusCodesWhenComplete?: string; completeExpression?: string; limitPagesFetched?: boolean; maxRequests?: number; requestInterval?: number; }; }; proxy?: string; timeout?: number; sendCredentialsOnCrossOriginRedirect?: boolean; }; /** Whether the optimize the tool response to reduce amount of data passed to the LLM that could lead to better result and reduce cost */ readonly optimizeResponse?: boolean; /** Default: "json" */ readonly responseType?: "json" | "html" | "text"; /** Specify the name of the field in the response containing the data */ readonly dataField?: string; /** * What fields response object should include * Default: "all" */ readonly fieldsToInclude?: "all" | "selected" | "except"; /** Comma-separated list of the field names. Supports dot notation. You can drag the selected fields from the input panel. */ readonly fields?: string; /** * Select specific element(e.g. body) or multiple elements(e.g. div) of chosen type in the response HTML. * Default: "body" */ readonly cssSelector?: string; /** Whether to return only content of html elements, stripping html tags and attributes */ readonly onlyContent?: boolean; /** Comma-separated list of selectors that would be excluded when extracting content */ readonly elementsToOmit?: string; readonly truncateResponse?: boolean; /** * Default: 1000 * Type options: {"minValue":1} */ readonly maxLength?: number; } //#endregion //#region src/generated/nodes-impl/HttpRequestV3.d.ts interface HttpRequestV3Props extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: HttpRequestV3NodeParameters; readonly httpSslAuthCredentials?: Credentials; } /** * Makes an HTTP request and returns the response data */ declare class HttpRequestV3 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.httpRequest"; protected typeVersion: 4.4; constructor(id: L, props?: P | undefined); getCredentials(): (Credentials | undefined)[]; } //#endregion //#region src/nodes/http-request.d.ts type HttpRequestProps = Omit & { parameters: RequireFields, "method" | "url">; }; type WithCredentials = T & { [k in N8nCredentialsUnion["__name"] as `${k}Credentials`]?: Credentials> }; declare class HttpRequest> extends HttpRequestV3 { props: P; constructor(id: L, props: P); private setDefaultParameters; "~validate"(): void; getCredentials(): Array; } //#endregion //#region src/generated/nodes/IfV2.d.ts interface IfV2NodeParameters { /** * Default: {} * Type options: {"filter":{"caseSensitive":"={{!$parameter.options.ignoreCase}}","typeValidation":"={{ ($nodeVersion < 2.1 ? $parameter.options.looseTypeValidation : $parameter.looseTypeValidation) ? \"loose\" : \"strict\" }}","version":"={{ $nodeVersion >= 2.3 ? 3 : $nodeVersion >= 2.2 ? 2 : 1 }}"}} */ readonly conditions?: unknown; /** If the type of an expression doesn't match the type of the comparison, n8n will try to cast the expression to the required type. E.g. for booleans "false" or 0 will be cast to false */ readonly looseTypeValidation?: boolean; /** Default: {} */ readonly options?: { ignoreCase?: boolean; looseTypeValidation?: boolean; }; } //#endregion //#region src/generated/nodes-impl/IfV2.d.ts interface IfV2Props extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: IfV2NodeParameters; } /** * Route items to different branches (true/false) */ declare class IfV2 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.if"; protected typeVersion: 2.3; constructor(id: L, props?: P | undefined); } //#endregion //#region src/nodes/if.d.ts type ConditionCombinator = "and" | "or"; type StringCondition = BaseCondition & { leftValue: ExpressionOrValue; rightValue?: ExpressionOrValue; operator: { type: "string"; operation: "exists" | "notExists" | "empty" | "notEmpty" | "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "notStartsWith" | "endsWith" | "notEndsWith" | "regex" | "notRegex"; }; }; type NumberCondition = BaseCondition & { leftValue: ExpressionOrValue; rightValue?: ExpressionOrValue; operator: { type: "number"; operation: "exists" | "notExists" | "empty" | "notEmpty" | "equals" | "notEquals" | "gt" | "gte" | "lt" | "lte"; }; }; type DateTimeCondition = BaseCondition & { leftValue: ExpressionOrValue; rightValue?: ExpressionOrValue; operator: { type: "dateTime"; operation: "exists" | "notExists" | "empty" | "notEmpty" | "equals" | "notEquals" | "after" | "afterOrEquals" | "before" | "beforeOrEquals"; }; }; type BooleanCondition = BaseCondition & { leftValue: ExpressionOrValue; rightValue?: ExpressionOrValue; operator: { type: "boolean"; operation: "exists" | "notExists" | "empty" | "notEmpty" | "equals" | "notEquals" | "true" | "false"; }; }; type ArrayCondition = BaseCondition & { leftValue: ExpressionOrValue>; rightValue?: ExpressionOrValue; operator: { type: "array"; operation: "exists" | "notExists" | "empty" | "notEmpty" | "contains" | "notContains" | "lengthEquals" | "lengthNotEquals" | "lengthGt" | "lengthGte" | "lengthLt" | "lengthLte"; }; }; type ObjectCondition = BaseCondition & { leftValue: ExpressionOrValue>; rightValue?: never; operator: { type: "object"; operation: "exists" | "notExists" | "empty" | "notEmpty"; }; }; type BaseCondition = { id?: string; leftValue: unknown; rightValue?: unknown; operator: { type: unknown; operation: unknown; singleValue?: boolean; }; }; interface IfProps extends NodeProps { parameters: Omit, "conditions"> & { conditions?: { conditions: Array; /** @default "and" */ combinator?: ConditionCombinator; options?: Record; }; }; } declare class If extends IfV2 { props: IfProps; /** @internal */ endStates: INextable[]; constructor(id: L, props: IfProps); "~validate"(): void; getParameters(): Promise<{ looseTypeValidation: boolean | undefined; options: { ignoreCase?: boolean; looseTypeValidation?: boolean; } | undefined; conditions: { conditions: (StringCondition | NumberCondition | DateTimeCondition | BooleanCondition | ArrayCondition | ObjectCondition)[]; combinator: ConditionCombinator; options: { caseSensitive: boolean; version: number; typeValidation: string; }; } | undefined; }>; /** * Determines if this `If` node can accept additional input connections * @returns True if less than 2 end states are connected (allowing one true/false branches) */ canTakeInput(_fromState: IChainable, _withConnectionOptions?: ConnectionOptions): boolean; /** * Connects a node or chain to execute when the `If` condition evaluates to true * @param next - The node or chain to execute on true condition * @param connectionOptions - Optional connection configuration (excluding 'from' which is set to 0) * @returns Updated `If` node with the true branch configured */ true(next: IsNullable extends true ? N : ErrorMessage<"true() node is already set">, connectionOptions?: Omit): If, AddNodeIdToIds>; /** * Connects a node or chain to execute when the `If` condition evaluates to false * @param next - The node or chain to execute on false condition * @param connectionOptions - Optional connection configuration (excluding 'from' which is set to 1) * @returns Updated `If` node with the false branch configured */ false(next: IsNullable extends true ? N : ErrorMessage<"false() node is already set">, connectionOptions?: Omit): If, AddNodeIdToIds>; } //#endregion //#region src/generated/nodes/MergeV3.d.ts interface MergeV3NodeParameters { /** * How input data should be merged * Default: "append" */ readonly mode?: "append" | "combine" | "combineBySql" | "chooseBranch"; /** * How input data should be merged * Default: "combineByFields" */ readonly combineBy?: "combineByFields" | "combineByPosition" | "combineAll"; /** * The number of data inputs you want to merge. The node waits for all connected inputs to be executed. * Default: 2 */ readonly numberInputs?: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; /** Default: {} */ readonly options?: { clashHandling?: { values: { resolveClash?: string; mergeMode?: "deepMerge" | "shallowMerge"; overrideEmpty?: boolean; }; }; fuzzyCompare?: boolean; } | { clashHandling?: { values: { resolveClash?: string; mergeMode?: "deepMerge" | "shallowMerge"; overrideEmpty?: boolean; }; }; disableDotNotation?: boolean; fuzzyCompare?: boolean; multipleMatches?: "all" | "first"; } | { emptyQueryResult?: "success" | "empty"; } | { clashHandling?: { values: { resolveClash?: string; mergeMode?: "deepMerge" | "shallowMerge"; overrideEmpty?: boolean; }; }; includeUnpaired?: boolean; }; /** Whether name(s) of field to match are different in input 1 and input 2 */ readonly advanced?: boolean; /** Specify the fields to use for matching input items */ readonly fieldsToMatchString?: string; /** * Specify the fields to use for matching input items * Default: {"values":[{"field1":"","field2":""}]} * Type options: {"multipleValues":true} */ readonly mergeByFields?: { values: Array<{ field1?: string; field2?: string; }>; }; /** * How to select the items to send to output * Default: "keepMatches" */ readonly joinMode?: "keepMatches" | "keepNonMatches" | "keepEverything" | "enrichInput1" | "enrichInput2"; /** Default: "both" */ readonly outputDataFrom?: "both" | "input1" | "input2"; /** * Input data available as tables with corresponding number, e.g. input1, input2 * Default: "SELECT * FROM input1 LEFT JOIN input2 ON input1.name = input2.id" * Type options: {"rows":5,"editor":"sqlEditor"} */ readonly query?: string; /** Default: "waitForAll" */ readonly chooseBranchMode?: "waitForAll"; /** Default: "specifiedInput" */ readonly output?: "specifiedInput" | "empty"; /** * The number of the input to use data of * Default: 1 * Type options: {"minValue":1,"loadOptionsMethod":"getInputs","loadOptionsDependsOn":["numberInputs"]} */ readonly useDataOfInput?: string; } //#endregion //#region src/generated/nodes-impl/MergeV3.d.ts interface MergeV3Props extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: MergeV3NodeParameters; } /** * Merges data of multiple streams once data from both is available */ declare class MergeV3 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.merge"; protected typeVersion: 3.2; constructor(id: L, props?: P | undefined); withCustom(type: "ai_textSplitter" | "ai_embedding" | "ai_document" | "ai_languageModel" | "ai_memory" | "ai_tool" | "ai_vectorStore" | "ai_outputParser", next: State): this; } //#endregion //#region src/nodes/merge.d.ts declare class Merge extends MergeV3 { constructor(id: L, props?: MergeV3Props); } //#endregion //#region src/generated/nodes/Nasa.d.ts interface NasaNodeParameters { /** Default: "astronomyPictureOfTheDay" */ readonly resource?: "asteroidNeoBrowse" | "asteroidNeoFeed" | "asteroidNeoLookup" | "astronomyPictureOfTheDay" | "donkiCoronalMassEjection" | "donkiHighSpeedStream" | "donkiInterplanetaryShock" | "donkiMagnetopauseCrossing" | "donkiNotifications" | "donkiRadiationBeltEnhancement" | "donkiSolarEnergeticParticle" | "donkiSolarFlare" | "donkiWsaEnlilSimulation" | "earthAssets" | "earthImagery"; /** Default: "get" */ readonly operation?: "get" | "getAll"; /** The ID of the asteroid to be returned */ readonly asteroidId?: string; /** Default: {} */ readonly additionalFields?: { includeCloseApproachData?: boolean; } | { date?: string; } | { startDate?: string; endDate?: string; } | { startDate?: string; endDate?: string; location?: "ALL" | "earth" | "MESSENGER" | "STEREO A" | "STEREO B"; catalog?: "ALL" | "SWRC_CATALOG" | "WINSLOW_MESSENGER_ICME_CATALOG"; } | { date?: string; dim?: number; }; /** * By default just the URL of the image is returned. When set to true the image will be downloaded. * Default: true */ readonly download?: boolean; /** Default: "data" */ readonly binaryPropertyName?: string; /** Latitude for the location of the image */ readonly lat?: number; /** Longitude for the location of the image */ readonly lon?: number; /** Whether to return all results or only up to a given limit */ readonly returnAll?: boolean; /** * Max number of results to return * Default: 20 * Type options: {"minValue":1} */ readonly limit?: number; } //#endregion //#region src/generated/nodes-impl/Nasa.d.ts interface NasaProps extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: NasaNodeParameters; readonly nasaApiCredentials: Credentials; } /** * Retrieve data from the NASA API */ declare class Nasa$1 extends Node["infer"]> { props: P; protected type: "n8n-nodes-base.nasa"; protected typeVersion: 1; constructor(id: L, props: P); getCredentials(): Credentials[]; } //#endregion //#region src/nodes/nasa.d.ts declare class Nasa extends Nasa$1["resource"] extends "donkiSolarFlare" ? { classType: string; } : { __TODO: string; } : never> { props: P; constructor(id: L, props: P); } //#endregion //#region src/generated/nodes/NoOp.d.ts interface NoOpNodeParameters {} //#endregion //#region src/generated/nodes-impl/NoOp.d.ts interface NoOpProps extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: NoOpNodeParameters; } /** * No Operation */ declare class NoOp$1 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.noOp"; protected typeVersion: 1; constructor(id: L, props?: P | undefined); } //#endregion //#region src/nodes/noop.d.ts declare class NoOp extends NoOp$1 { constructor(id: L, props?: Omit); } //#endregion //#region src/generated/nodes/ScheduleTrigger.d.ts interface ScheduleTriggerNodeParameters { /** * Default: {"interval":[{"field":"days"}]} * Type options: {"multipleValues":true} */ readonly rule?: { interval: Array<{ field?: "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "cronExpression"; secondsInterval?: number; minutesInterval?: number; hoursInterval?: number; daysInterval?: number; weeksInterval?: number; monthsInterval?: number; triggerAtDayOfMonth?: number; triggerAtDay?: (1 | 2 | 3 | 4 | 5 | 6 | 0)[]; triggerAtHour?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23; triggerAtMinute?: number; notice?: string; expression?: string; }>; }; } //#endregion //#region src/generated/nodes-impl/ScheduleTrigger.d.ts interface ScheduleTriggerProps extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: ScheduleTriggerNodeParameters; } /** * Triggers the workflow on a given schedule */ declare class ScheduleTrigger$1 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.scheduleTrigger"; protected typeVersion: 1.3; constructor(id: L, props?: P | undefined); } //#endregion //#region src/nodes/schedule-trigger.d.ts declare class ScheduleTrigger extends ScheduleTrigger$1 { props: Omit; constructor(id: L, props: Omit); } //#endregion //#region src/generated/nodes/StickyNote.d.ts interface StickyNoteNodeParameters { /** Default: "## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/components/sticky-notes/)" */ readonly content?: string; /** Default: 160 */ readonly height?: number; /** Default: 240 */ readonly width?: number; /** Default: 1 */ readonly color?: number; } //#endregion //#region src/generated/nodes-impl/StickyNote.d.ts interface StickyNoteProps$1 extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: StickyNoteNodeParameters; } /** * Make your workflow easier to understand */ declare class StickyNote$1 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.stickyNote"; protected typeVersion: 1; constructor(id: L, props?: P | undefined); } //#endregion //#region src/nodes/sticky-note.d.ts declare const StickyNoteColors: { readonly YELLOW: 1; readonly BROWN: 2; readonly RED: 3; readonly GREEN: 4; readonly BLUE: 5; readonly VIOLET: 6; readonly GRAY: 7; }; interface StickyNoteProps extends NodeProps { position: NodePosition; parameters: Omit & { color?: keyof typeof StickyNoteColors; }; } declare class StickyNote extends StickyNote$1 { props: StickyNoteProps; /** @internal */ endStates: INextable[]; constructor(id: L, props: StickyNoteProps); getParameters(): Promise<{ height: number | undefined; width: number | undefined; color: 2 | 1 | 7 | 3 | 4 | 5 | 6 | undefined; content?: string; }>; } //#endregion //#region src/generated/nodes/RespondToWebhook.d.ts interface RespondToWebhookNodeParameters { /** Whether to provide an additional output branch with the response sent to the webhook */ readonly enableResponseOutput?: boolean; /** * The data that should be returned * Default: "firstIncomingItem" */ readonly respondWith?: "allIncomingItems" | "binary" | "firstIncomingItem" | "json" | "jwt" | "noData" | "redirect" | "text"; /** The URL to redirect to */ readonly redirectURL?: string; /** * The HTTP response JSON data * Default: "{\n \"myField\": \"value\"\n}" * Type options: {"rows":4} */ readonly responseBody?: string; /** * The payload to include in the JWT token * Default: "{\n \"myField\": \"value\"\n}" * Type options: {"rows":4} */ readonly payload?: string; /** Default: "automatically" */ readonly responseDataSource?: "automatically" | "set"; /** * The name of the node input field with the binary data * Default: "data" */ readonly inputFieldName?: string; /** Default: {} */ readonly options?: { responseCode?: number; responseHeaders?: { entries: Array<{ name?: string; value?: string; }>; }; responseKey?: string; enableStreaming?: boolean; }; } //#endregion //#region src/generated/nodes-impl/RespondToWebhook.d.ts interface RespondToWebhookProps extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: RespondToWebhookNodeParameters; readonly jwtAuthCredentials?: Credentials; } /** * Returns data for Webhook */ declare class RespondToWebhook extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.respondToWebhook"; protected typeVersion: 1.5; constructor(id: L, props?: P | undefined); getCredentials(): (Credentials | undefined)[]; toCustom(type: "ai_textSplitter" | "ai_embedding" | "ai_document" | "ai_languageModel" | "ai_memory" | "ai_tool" | "ai_vectorStore" | "ai_outputParser", next: IChainable): this; } //#endregion //#region src/nodes/webhook-response.d.ts declare class WebhookResponse extends RespondToWebhook { props: RequireFields; constructor(id: L, props: RequireFields); "~validate"(): void; } //#endregion //#region src/generated/nodes/Webhook.d.ts interface WebhookNodeParameters { /** Whether to allow the webhook to listen for multiple HTTP methods */ readonly multipleMethods?: boolean; /** * The HTTP method to listen to * Default: "GET" */ readonly httpMethod?: "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | ("DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT")[]; /** The path to listen to, dynamic values could be specified by using ':', e.g. 'your-path/:dynamic-value'. If dynamic values are set 'webhookId' would be prepended to path. */ readonly path?: string; /** * The way to authenticate * Default: "none" */ readonly authentication?: "basicAuth" | "headerAuth" | "jwtAuth" | "none"; /** * When and how to respond to the webhook * Default: "onReceived" */ readonly responseMode?: "onReceived" | "lastNode" | "responseNode" | "onReceived" | "lastNode" | "responseNode" | "streaming"; /** * The HTTP Response code to return * Default: 200 * Type options: {"minValue":100,"maxValue":599} */ readonly responseCode?: number; /** * What data should be returned. If it should return all items as an array or only the first item as object. * Default: "firstEntryJson" */ readonly responseData?: "allEntries" | "firstEntryJson" | "firstEntryBinary" | "noData"; /** * Name of the binary property to return * Default: "data" */ readonly responseBinaryPropertyName?: string; /** Default: {} */ readonly options?: { binaryData?: boolean; binaryPropertyName?: string; ignoreBots?: boolean; ipWhitelist?: string; noResponseBody?: boolean; responsePropertyName?: string; rawBody?: boolean; responseCode?: { values: { responseCode?: 200 | 201 | 204 | 301 | 302 | 304 | 400 | 401 | 403 | 404 | "customCode"; customCode?: number; }; }; responseContentType?: string; responseData?: string; responseHeaders?: { entries: Array<{ name?: string; value?: string; }>; }; }; } //#endregion //#region src/generated/nodes-impl/Webhook.d.ts interface WebhookProps$1 extends NodeProps { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ readonly outputSchema?: Type; readonly parameters?: WebhookNodeParameters; readonly httpBasicAuthCredentials?: Credentials; readonly httpHeaderAuthCredentials?: Credentials; readonly jwtAuthCredentials?: Credentials; } /** * Starts the workflow when a webhook is called */ declare class Webhook$1 extends Node["infer"]> { props?: P | undefined; protected type: "n8n-nodes-base.webhook"; protected typeVersion: 2.1; constructor(id: L, props?: P | undefined); getCredentials(): (Credentials | Credentials | Credentials | undefined)[]; toCustom(type: "ai_textSplitter" | "ai_embedding" | "ai_document" | "ai_languageModel" | "ai_memory" | "ai_tool" | "ai_vectorStore" | "ai_outputParser", next: IChainable): this; } //#endregion //#region src/nodes/webhook.d.ts interface WebhookProps extends Omit { parameters: RequireFields; outputSchema?: { /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */params?: Type; /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ headers?: Type; /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ body?: Type; /** Output schema is only a TypeScript typedef used for compile-time typing. * It does NOT perform runtime validation. * Use `Code` nodes or `If` nodes if you need to enforce structure at runtime. */ query?: Type; }; } type GetOutputSchemaField

> = IsNever extends true ? never : F extends keyof P["outputSchema"] ? IsNever extends true ? never : P["outputSchema"][F]["infer"] : never; declare class Webhook extends Webhook$1; params: GetOutputSchemaField; body: GetOutputSchemaField; query: GetOutputSchemaField; }> { props: P; constructor(id: L, props: P); } //#endregion //#region src/workflow/group/group.d.ts interface GroupProps extends Omit, Omit { filterNodes?: (node: State, index: number) => boolean; } declare class Group extends StickyNote { readonly _props: GroupProps; readonly chain: Chain; /** @internal */ static readonly [GROUP_SYMBOL] = true; /** @internal */ readonly [GROUP_SYMBOL] = true; constructor(workflow: Workflow, id: LiteralId, _props: GroupProps, chain: Chain); "~validate"(): void; } //#endregion //#region src/workflow/chain/expression-builder.d.ts type ReplaceBracketsWithString = T extends `${infer _1}[${infer _2}]${infer _3}` ? `${_1}[${string}]${_3}` : T; type ExtractStartingWith = T extends `${Prefix}${infer Rest}` ? Rest extends "" ? never : Rest : never; type SubPath = ExtractStartingWith, ReplaceBracketsWithString>; type ExpectedArray = ErrorMessage<"Expected array">; type ExpectedString = ErrorMessage<"Expected string">; type ExpressionBuilderMode = "item"; /** @hidden */ type ExpressionPrefix = "$" | "_"; type ExpressionBuilderOptions = { mode: ExpressionBuilderMode; prefix: ExpressionPrefix; noQuotes: boolean; }; declare class ExpressionBuilder> { private readonly path; private readonly methodCalls; private options; /** * The type of the current field * Should only be used with `typeof` * Returns null. */ readonly type: TCurr; constructor(path: Path, methodCalls?: string[], options?: ExpressionBuilderOptions); private clone; getFullPath(): Path; mode(mode: ExpressionBuilderMode): this; prefix(prefix: ExpressionPrefix): this; noQuotes(value?: boolean): this; getNodeId(): string; getPath(): string; format(): string; /** * return ={{ format() }} */ toExpression(): string; toJSON(): string; /** * Arbitrary method call */ call(methodName: string, ...args: any[]): ExpressionBuilder; /** * Apply an arbitrary transform function to the current value. * * The function body is parsed and converted into a chain of method calls. * The parameter type is inferred from the current field type, and the output * type is inferred from the function's return type. * * Example: * ```ts * $("json.text").apply(text => text.toUpperCase().split(" ").join("-")) * // Results in: "={{ $json.text.toUpperCase().split(' ').join('-') }}" * ``` * * Notes: * - The input parameter of the function is typed as the current field type (`TCurr`). * - The resulting ExpressionBuilder's output type will be inferred from the function return type. * - Not all JS globals or helper functions may be available inside n8n expression evaluation. */ apply(fn: (value: TCurr) => TOutput): ExpressionBuilder; toJsonString: () => this; find: TCurr extends Array ? (predicate: (item: TElem) => boolean) => ExpressionBuilder : ExpectedArray; filter: TCurr extends Array ? (predicate: (item: TElem) => boolean) => this : ExpectedArray; join: TCurr extends Array ? (separator: string) => ExpressionBuilder : ExpectedArray; first: TCurr extends Array ? () => ExpressionBuilder : ExpectedArray; last: TCurr extends Array ? () => ExpressionBuilder : ExpectedArray; toLowerCase: TCurr extends string ? () => this : ExpectedString; toUpperCase: TCurr extends string ? () => this : ExpectedString; trim: TCurr extends string ? () => this : ExpectedString; split: TCurr extends string ? (separator: string) => ExpressionBuilder> : ExpectedString; prop

>(propertyName: IsAny extends true ? string : P): ExpressionBuilder extends true ? any : `${Path}${P}`>; } /** @hidden */ declare function $$(): >(path: Path) => ExpressionBuilder; type ExpressionBuilderProvider = ReturnType>; type $Selector = ExpressionBuilderProvider>; declare const RESOLVED_NODE_ID_PREFIX: string; declare const RESOLVED_NODE_ID: (nodeId: string) => string; //#endregion //#region src/workflow/chain/chain.d.ts /** @hidden */ declare const NO_END_STATES: INextable[]; type PREVIOUS_CONTENT = "json"; /** @hidden */ type ChainContext = { [nodeId: string]: any; }; type IgnoreContext = IsNever extends true ? true : IsUnknown extends true ? true : IsAny extends true ? true : false; /** @hidden */ type AddIChainableToChainContext = Prettify ? IgnoreContext extends true ? Omit : Omit & C_CC : N extends Group ? IgnoreContext extends true ? Omit : Omit & G_Chain_CC : N extends If ? IgnoreContext extends true ? Omit : Omit : N extends IChainable ? IgnoreContext extends true ? Omit : { [k in Id]: C } & Omit & { [k in PREVIOUS_CONTENT as WithPrevious extends true ? k : never]: C } : CC>; /** @hidden */ type AddNodeIdToIds = N extends Group ? [...Ids, ...G_Chain_Ids] : N extends If ? [...Ids, ...G_Chain_Ids] : N extends Chain ? [...Ids, ...G_Chain_Ids] : N extends IChainable ? [...Ids, Id] : Ids; type ExtractChainContext = C extends Chain ? CC : {}; type ChainableProvider = N | ((params: { $: ExpressionBuilderProvider; }) => N); type MultipleChainableProvider = Array | ((params: { $: ExpressionBuilderProvider; }) => Array); /** * A collection of states to chain onto * * A Chain has a start and zero or more chainable ends. If there are * zero ends, calling next() on the Chain will fail. */ declare class Chain implements IChainable<"chain", CC> { private readonly lastAdded; "~context": CC; readonly id = "chain"; /** * Begin a new `Chain` from one chainable state * @param state - The chainable state to start the chain with * @returns A new `Chain` instance starting from the given state */ static start(state: N1): Chain<(N1 extends Chain ? IgnoreContext extends true ? Omit<{}, "json"> : Omit<{}, "json"> & C_CC : N1 extends Group ? IgnoreContext extends true ? Omit<{}, "json"> : Omit<{}, "json"> & G_Chain_CC : N1 extends If ? IgnoreContext extends true ? Omit<{}, "json"> : Omit<{} & I_Chain_CC, "json"> : N1 extends IChainable ? IgnoreContext extends true ? Omit<{}, "json"> : { [k in Id]: C } & Omit<{}, "json"> & { json: C; } : {}) extends infer T ? { [K in keyof T]: T[K] } : never, [N1["id"]], false>; /** * The start state of this chain */ readonly startState: State; /** * The chainable end state(s) of this chain */ readonly endStates: INextable[]; private constructor(); private checkCanAddNext; /** * Continue normal execution by adding the next state to the chain * @param _next - The next chainable state or a function that provides it * @param connectionOptions - Optional connection configuration * @returns A new `Chain` instance with the added state */ next(_next: EndsInMultiple extends true ? ErrorMessage<"Cannot use next() after multiple(), use connect() instead"> : ChainableProvider, connectionOptions?: ConnectionOptions): Chain, AddNodeIdToIds>; /** * Connect multiple states in parallel to all current end states * After using `multiple()`, you must use `connect()` to continue the chain * @param _next - Array of chainable states or a function that provides them * @returns A new `Chain` instance marked as ending in multiple states * @throws Error if no states are provided */ multiple(_next: MultipleChainableProvider): Chain, AddNodeIdToIds, true>; /** * Connect a new state to specific states in the chain by their IDs * Used to create connections from specific nodes rather than all end states * @param ids - Array of state IDs to connect from * @param _next - The next chainable state or a function that provides it * @param connectionOptions - Optional connection configuration for each ID * @returns A new `Chain` instance with the connected state * @throws Error if any specified state ID does not exist in the chain */ connect, N extends IChainable>(ids: Ids, _next: ChainableProvider, connectionOptions?: { [k in Ids[number]]?: Pick }): Chain>; /** * Get all states that this chain traverses * Performs a breadth-first traversal of the chain to collect all reachable states * @returns Array of all states in the chain, including nested `Chain` instances */ toList(): State[]; } //#endregion //#region src/workflow/chain/expression.d.ts /** * Template literal function for creating n8n expressions. * Combines string literals with ExpressionBuilder instances and other values * to produce n8n-compatible expression strings. * * Format to `string{{ expression.format() }}` * * @param strings - Template string array from template literal * @param values - Interpolated values (ExpressionBuilder instances, strings, etc.) * @returns n8n expression string prefixed with '=' * @throws Error if unsupported value type is provided */ declare function expr(strings: TemplateStringsArray, ...values: any[]): string; type InferJsonExpression = T extends readonly any[] | Record ? { [K in keyof T]: T[K] extends ExpressionBuilder ? U : T[K] extends Array | Record ? InferJsonExpression : T[K] } : never; /** * Class for creating JSON-based n8n expressions with type safety. * Allows combining static JSON data with ExpressionBuilder instances * to create complex n8n expressions. */ declare class JsonExpression { private data; /** * Only used to infer the type of the data */ infer: Type; constructor(data: Type); /** * Factory method to create a JsonExpression with proper type inference. * Recursively infers types from nested ExpressionBuilder instances. * * @param data - The data structure containing JSON and ExpressionBuilder instances * @returns A JsonExpression with inferred types */ static from(data: T): JsonExpression>>; /** * Converts the JsonExpression to an n8n expression string. * Serializes the data to JSON and processes special markers to inject expressions. * * @param options - Formatting options * @param options.indent - Number of spaces for JSON indentation (default: 0) * @param options.withPrefix - Whether to prefix with '=' (default: true) * @param options.removeCurly - Whether to remove curly braces from expressions (`{{ x }}` => `x`) (default: false) * @param options.removeEquals - Whether to remove equals signs from expressions (`=x` => `x`) (default: true) * @returns n8n-compatible expression string */ toExpression(options?: { indent?: number; withPrefix?: boolean; removeCurly?: boolean; removeEquals?: boolean; }): string; } /** * Type utility for values that can be either an ExpressionBuilder or a direct value * * Also allows string as they can represent "={{ }}" expressions pointing to a T value */ type ExpressionOrValue = ExpressionBuilder | T | string; /** * Resolves an ExpressionOrValue to its string representation for use in n8n workflows. * If the value is an ExpressionBuilder, returns its expression string. * Otherwise, returns the value as-is. * * @param value - The value to resolve, either an ExpressionBuilder or direct value * @returns The resolved value (expression string for ExpressionBuilder, original value otherwise) */ declare function resolveExpressionValue(value: ExpressionOrValue): T | string; /** * @internal * * Recursively applies a transformation function to all ExpressionBuilder instances * within a nested object structure. This utility function is used to modify expressions * throughout complex data structures while preserving the overall structure. * * The function performs a deep traversal of the object, identifying ExpressionBuilder * instances at any nesting level and applying the provided transformation function * to each one. Other values (primitives, null, etc.) are left unchanged. * * @param obj - The object to traverse and transform * @param fn - Transformation function to apply to each ExpressionBuilder instance * @returns A new object with the same structure but transformed ExpressionBuilder instances * * @example * ```typescript * const data = { * name: "test", * expr: $("item.id"), * nested: { * value: $("item.value") * } * }; * * const transformed = applyToExpression(data, (expr) => expr.prefix("_")); * // Result: ExpressionBuilder instances are transformed, other values unchanged * ``` */ declare function applyToExpression(obj: T, fn: (expression: ExpressionBuilder) => ExpressionBuilder): T; //#endregion //#region src/workflow/chain/placeholder.d.ts /** * This "node" will be replaced by the actual node when the workflow is built. * * You can't call `next()` on it. * * id can be the label or the id of the node. * * Example: * ```ts * definition: [ * Chain.start(new NoOp("A")).next(new Placeholder("C")), * Chain.start(new NoOp("B")).next(new NoOp("C")), * ] * ``` * * This will result in: * ``` * A -> C * B -> C * ``` */ declare class Placeholder extends State { readonly endStates: INextable[]; constructor(id: L); } //#endregion //#region src/app/app.d.ts declare class App { readonly workflows: Workflow[]; readonly credentials: Credentials[]; readonly importedWorkflows: ImportedWorkflow[]; add(thing: Workflow | Credentials | ImportedWorkflow): this; private addCredentials; private addWorkflow; private addImportedWorkflow; /** @internal */ "~validate"(): void; } //#endregion export { IfProps as $, CredentialsByName as $t, RespondToWebhookNodeParameters as A, NODE_SYMBOL as At, NoOp as B, WorkflowProps as Bt, WebhookProps as C, CodeProps as Ct, WebhookResponse as D, NodeProps as Dt, WebhookNodeParameters as E, Node as Et, StickyNoteNodeParameters as F, isWorkflow as Ft, Nasa$1 as G, IContext as Gt, NoOpProps as H, ResolvedWorkflow as Ht, ScheduleTrigger as I, RESOLVED_WORKFLOW_ID as It, Merge as J, State as Jt, NasaProps as K, INextable as Kt, ScheduleTrigger$1 as L, RESOLVED_WORKFLOW_ID_PREFIX as Lt, StickyNoteProps as M, isGroup as Mt, StickyNote$1 as N, isImportedWorkflow as Nt, RespondToWebhook as O, GROUP_SYMBOL as Ot, StickyNoteProps$1 as P, isNode as Pt, If as Q, Credentials as Qt, ScheduleTriggerProps as R, Workflow as Rt, Webhook as S, Code as St, WebhookProps$1 as T, CodeProps$1 as Tt, NoOpNodeParameters as U, ConnectionOptions as Ut, NoOp$1 as V, workflowTagId as Vt, Nasa as W, IChainable as Wt, MergeV3Props as X, PythonFunction as Xt, MergeV3 as Y, CodeNodeParameters as Yt, MergeV3NodeParameters as Z, NodejsFunction as Zt, ExpressionBuilderProvider as _, ExecuteWorkflowTrigger as _t, applyToExpression as a, HttpRequestV3Props as at, RESOLVED_NODE_ID_PREFIX as b, ExecuteWorkflowTriggerProps$1 as bt, AddIChainableToChainContext as c, SetProps as ct, ChainContext as d, SetV2NodeParameters as dt, IfV2 as et, ExtractChainContext as f, ExecuteWorkflow as ft, ExpressionBuilder as g, ExecuteWorkflowNodeParameters as gt, $Selector as h, ExecuteWorkflowProps$1 as ht, JsonExpression as i, HttpRequestV3 as it, StickyNote as j, WORKFLOW_SYMBOL as jt, RespondToWebhookProps as k, IMPORTED_WORKFLOW_SYMBOL as kt, AddNodeIdToIds as l, SetV2 as lt, $$ as m, ExecuteWorkflow$1 as mt, Placeholder as n, IfV2NodeParameters as nt, expr as o, HttpRequestV3NodeParameters as ot, NO_END_STATES as p, ExecuteWorkflowProps as pt, NasaNodeParameters as q, Identifiable as qt, ExpressionOrValue as r, HttpRequest as rt, resolveExpressionValue as s, Fields as st, App as t, IfV2Props as tt, Chain as u, SetV2Props as ut, ExpressionPrefix as v, ExecuteWorkflowTriggerProps as vt, Webhook$1 as w, Code$1 as wt, Group as x, ExecuteWorkflowTriggerNodeParameters as xt, RESOLVED_NODE_ID as y, ExecuteWorkflowTrigger$1 as yt, ScheduleTriggerNodeParameters as z, WorkflowDefinition as zt };