2024-11-25 14:33:43 -08:00
|
|
|
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,
|
2024-11-26 06:48:28 -08:00
|
|
|
defaultMatch: true,
|
2024-11-25 14:33:43 -08:00
|
|
|
display: true,
|
2024-11-26 06:48:28 -08:00
|
|
|
type: 'number',
|
2024-11-25 14:33:43 -08:00
|
|
|
canBeUsedToMatch: true,
|
|
|
|
}));
|
|
|
|
|
|
|
|
return { fields };
|
|
|
|
}
|