mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
25 lines
562 B
TypeScript
25 lines
562 B
TypeScript
import type {
|
|
ILoadOptionsFunctions,
|
|
ResourceMapperField,
|
|
ResourceMapperFields,
|
|
} from 'n8n-workflow';
|
|
|
|
export async function getWorkflowInputs(
|
|
this: ILoadOptionsFunctions,
|
|
): Promise<ResourceMapperFields> {
|
|
// TODO: take the columns from the workflow input
|
|
const workflowInputs = ['uid', 'Test Field 2', 'Test Field 3'];
|
|
|
|
const fields: ResourceMapperField[] = workflowInputs.map((col) => ({
|
|
id: col,
|
|
displayName: col,
|
|
required: false,
|
|
defaultMatch: true,
|
|
display: true,
|
|
type: 'number',
|
|
canBeUsedToMatch: true,
|
|
}));
|
|
|
|
return { fields };
|
|
}
|