CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-n8n-workflow

Workflow base code of n8n providing foundational workflow execution engine for automation platform

Pending
Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

type-guards.mddocs/

Type Guards

Runtime type checking functions that validate if values match specific n8n interface types, providing type safety for dynamic workflow data.

Capabilities

Node Property Type Guards

Type guard functions for validating node property configurations and structures.

/**
 * Checks if a value is a valid INodeProperties interface
 * @param value - Value to check
 * @returns true if value matches INodeProperties structure
 */
function isINodeProperties(value: any): value is INodeProperties;

/**
 * Checks if a value is a valid INodePropertyOptions interface  
 * @param value - Value to check
 * @returns true if value matches INodePropertyOptions structure
 */
function isINodePropertyOptions(value: any): value is INodePropertyOptions;

/**
 * Checks if a value is a valid INodePropertyCollection interface
 * @param value - Value to check  
 * @returns true if value matches INodePropertyCollection structure
 */
function isINodePropertyCollection(value: any): value is INodePropertyCollection;

/**
 * Checks if a value is a valid list of INodeProperties
 * @param value - Value to check
 * @returns true if value is an array of INodeProperties
 */
function isINodePropertiesList(value: any): value is INodeProperties[];

/**
 * Checks if a value is a valid list of INodePropertyCollection
 * @param value - Value to check
 * @returns true if value is an array of INodePropertyCollection
 */
function isINodePropertyCollectionList(value: any): value is INodePropertyCollection[];

/**
 * Checks if a value is a valid list of INodePropertyOptions
 * @param value - Value to check
 * @returns true if value is an array of INodePropertyOptions
 */
function isINodePropertyOptionsList(value: any): value is INodePropertyOptions[];

Resource and Value Type Guards

Type guard functions for validating resource mapper values, locator values, and filter configurations.

/**
 * Checks if a value is a valid resource mapper value
 * @param value - Value to check
 * @returns true if value matches IResourceMapperValue structure
 */
function isResourceMapperValue(value: any): value is IResourceMapperValue;

/**
 * Checks if a value is a valid resource locator value
 * @param value - Value to check  
 * @returns true if value matches IResourceLocatorValue structure
 */
function isResourceLocatorValue(value: any): value is IResourceLocatorValue;

/**
 * Checks if a value is a valid filter value configuration
 * @param value - Value to check
 * @returns true if value matches IFilterValue structure  
 */
function isFilterValue(value: any): value is IFilterValue;

Types

The type guard functions validate against these core interfaces:

interface INodeProperties {
  displayName: string;
  name: string;
  type: NodePropertyTypes;
  default?: NodeParameterValueType;
  description?: string;
  options?: INodePropertyOptions[];
  placeholder?: string;
  required?: boolean;
  displayOptions?: IDisplayOptions;
  routing?: INodePropertyRouting;
  credentialTypes?: INodePropertyCredentialType[];
  // Additional properties...
}

interface INodePropertyOptions {
  name: string;
  value: string | number | boolean;
  description?: string;
  action?: string;
  routing?: INodePropertyRouting;
}

interface INodePropertyCollection {
  displayName: string;
  name: string;
  values: INodeProperties[];
  default?: IDataObject;
  description?: string;
  displayOptions?: IDisplayOptions;
  options?: INodePropertyCollectionOption[];
}

interface IResourceMapperValue {
  mappingMode: string;
  value: object | null;
  matchingColumns: string[];
  schema: ResourceMapperField[];
}

interface IResourceLocatorValue {
  mode: string;
  value: NodeParameterValueType;
  cachedResultName?: string;
  cachedResultUrl?: string;
  __rl: true;
}

interface IFilterValue {
  conditions: FilterConditionValue;
  combinator: FilterCombinator;
  // Additional filter properties...
}

docs

constants.md

data-proxy.md

error-handling.md

expression-system.md

extension-system.md

graph-utilities.md

index.md

node-execution.md

specialized-modules.md

type-guards.md

type-validation.md

utilities.md

workflow-management.md

tile.json