Files
Agent-n8n/n8n-n8n-1.109.2/packages/workflow/src/extensions/extensions.ts

42 lines
935 B
TypeScript
Raw Normal View History

2025-09-08 04:48:28 +08:00
export interface ExtensionMap {
typeName: string;
functions: Record<string, Extension>;
}
// eslint-disable-next-line @typescript-eslint/no-restricted-types
export type Extension = Function & { doc?: DocMetadata };
export type NativeDoc = {
typeName: string;
properties?: Record<string, { doc?: DocMetadata }>;
functions: Record<string, { doc?: DocMetadata }>;
};
export type DocMetadataArgument = {
name: string;
type?: string;
optional?: boolean;
variadic?: boolean;
description?: string;
default?: string;
// Function arguments have nested arguments
args?: DocMetadataArgument[];
};
export type DocMetadataExample = {
example: string;
evaluated?: string;
description?: string;
};
export type DocMetadata = {
name: string;
returnType: string;
description?: string;
section?: string;
hidden?: boolean;
aliases?: string[];
args?: DocMetadataArgument[];
examples?: DocMetadataExample[];
docURL?: string;
};