n8n/packages/nodes-base/nodes/DataTable/common/fields.ts
Mutasem Aldmour 72eca2f398
refactor: Rename node-level builderHint.message to searchHint and propertyHint (#30062)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 13:32:50 +00:00

45 lines
1.1 KiB
TypeScript

import type { INodeProperties } from 'n8n-workflow';
export const DATA_TABLE_ID_FIELD = 'dataTableId';
export const DRY_RUN = {
displayName: 'Dry Run',
name: 'dryRun',
type: 'boolean',
default: false,
description:
'Whether the operation simulates and returns affected rows in their "before" and "after" states',
} satisfies INodeProperties;
export const DATA_TABLE_RESOURCE_LOCATOR_BASE = {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
displayName: 'Data table',
name: DATA_TABLE_ID_FIELD,
type: 'resourceLocator',
default: { mode: 'list', value: '' },
required: true,
builderHint: { propertyHint: "Default to mode: 'list' which is easier for users to set up" },
modes: [
{
displayName: 'From List',
name: 'list',
type: 'list',
typeOptions: {
searchListMethod: 'tableSearch',
searchable: true,
},
},
{
displayName: 'By Name',
name: 'name',
type: 'string',
placeholder: 'e.g. My Table',
},
{
displayName: 'ID',
name: 'id',
type: 'string',
},
],
} as const satisfies Omit<INodeProperties, 'displayOptions'>;