Some checks failed
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
74 lines
1.2 KiB
TypeScript
74 lines
1.2 KiB
TypeScript
import { array, name, uuid } from 'minifaker';
|
|
import 'minifaker/locales/en';
|
|
import type {
|
|
INodeExecutionData,
|
|
INodeListSearchResult,
|
|
INodePropertyOptions,
|
|
ResourceMapperFields,
|
|
} from 'n8n-workflow';
|
|
|
|
export const returnData: INodeExecutionData[] = [
|
|
{
|
|
json: {
|
|
id: '23423532',
|
|
name: 'Hello World',
|
|
},
|
|
},
|
|
];
|
|
|
|
export const remoteOptions: INodePropertyOptions[] = [
|
|
{
|
|
name: 'Resource 1',
|
|
value: 'resource1',
|
|
},
|
|
{
|
|
name: 'Resource 2',
|
|
value: 'resource2',
|
|
},
|
|
{
|
|
name: 'Resource 3',
|
|
value: 'resource3',
|
|
},
|
|
];
|
|
|
|
export const resourceMapperFields: ResourceMapperFields = {
|
|
fields: [
|
|
{
|
|
id: 'id',
|
|
displayName: 'ID',
|
|
defaultMatch: true,
|
|
canBeUsedToMatch: true,
|
|
required: true,
|
|
display: true,
|
|
type: 'string',
|
|
},
|
|
{
|
|
id: 'name',
|
|
displayName: 'Name',
|
|
defaultMatch: false,
|
|
canBeUsedToMatch: false,
|
|
required: false,
|
|
display: true,
|
|
type: 'string',
|
|
},
|
|
{
|
|
id: 'age',
|
|
displayName: 'Age',
|
|
defaultMatch: false,
|
|
canBeUsedToMatch: false,
|
|
required: false,
|
|
display: true,
|
|
type: 'number',
|
|
},
|
|
],
|
|
};
|
|
|
|
export const searchOptions: INodeListSearchResult['results'] = array(100, () => {
|
|
const value = uuid.v4();
|
|
return {
|
|
name: name(),
|
|
value,
|
|
url: 'https://example.com/user/' + value,
|
|
};
|
|
});
|