UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

71 lines (66 loc) 2.09 kB
/** * Set Node - Version 2 * Sets values on items and optionally remove other values */ export interface SetV2Params { /** * Whether only the values set on this node should be kept and all others removed * @default false */ keepOnlySet?: boolean | Expression<boolean>; /** * The value to set * @default {} */ values?: { /** Boolean */ boolean?: Array<{ /** Name of the property to write data to. Supports dot-notation. Example: "data.person[0].name" * @default propertyName */ name?: string | Expression<string> | PlaceholderValue; /** The boolean value to write in the property * @default false */ value?: boolean | Expression<boolean>; }>; /** Number */ number?: Array<{ /** Name of the property to write data to. Supports dot-notation. Example: "data.person[0].name" * @default propertyName */ name?: string | Expression<string> | PlaceholderValue; /** The number value to write in the property * @default 0 */ value?: number | Expression<number>; }>; /** String */ string?: Array<{ /** Name of the property to write data to. Supports dot-notation. Example: "data.person[0].name" * @default propertyName */ name?: string | Expression<string> | PlaceholderValue; /** The string value to write in the property */ value?: string | Expression<string> | PlaceholderValue; }>; }; options?: { /** &lt;p&gt;By default, dot-notation is used in property names. This means that "a.b" will set the property "b" underneath "a" so { "a": { "b": value} }.&lt;p&gt;&lt;/p&gt;If that is not intended this can be deactivated, it will then set { "a.b": value } instead.&lt;/p&gt;. * @default true */ dotNotation?: boolean | Expression<boolean>; }; } interface SetV2NodeBase { type: 'n8n-nodes-base.set'; version: 2; } export type SetV2ParamsNode = SetV2NodeBase & { config: NodeConfig<SetV2Params>; }; export type SetV2Node = SetV2ParamsNode;