n8n/packages/nodes-base/nodes/Set/v2/helpers/interfaces.ts
Elias Meire d1163533a6
feat(Set Node): Preserve binary data by default (#9668)
Co-authored-by: Michael Kret <michael.k@radency.com>
2024-06-18 10:32:51 +02:00

35 lines
779 B
TypeScript

import type { IDataObject } from 'n8n-workflow';
export type SetNodeOptions = {
dotNotation?: boolean;
ignoreConversionErrors?: boolean;
include?: IncludeMods;
includeBinary?: boolean;
stripBinary?: boolean;
};
export type SetField = {
name: string;
type: 'stringValue' | 'numberValue' | 'booleanValue' | 'arrayValue' | 'objectValue';
stringValue?: string;
numberValue?: number;
booleanValue?: boolean;
arrayValue?: string[] | string | IDataObject | IDataObject[];
objectValue?: string | IDataObject;
};
export type AssignmentSetField = {
name: string;
value: unknown;
type: string;
};
export const INCLUDE = {
ALL: 'all',
NONE: 'none',
SELECTED: 'selected',
EXCEPT: 'except',
} as const;
export type IncludeMods = (typeof INCLUDE)[keyof typeof INCLUDE];