mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 09:04:07 -08:00
Fix breaking change that resulted in the old v1 node from appearing
This commit is contained in:
parent
5f4ada49b9
commit
787f33de4e
|
@ -8,7 +8,7 @@ export class SeaTable extends VersionedNodeType {
|
|||
constructor() {
|
||||
const baseDescription: INodeTypeBaseDescription = {
|
||||
displayName: 'SeaTable',
|
||||
name: 'seatable',
|
||||
name: 'seaTable',
|
||||
icon: 'file:seatable.svg',
|
||||
group: ['output'],
|
||||
subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
|
||||
|
@ -17,7 +17,7 @@ export class SeaTable extends VersionedNodeType {
|
|||
};
|
||||
|
||||
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
||||
1: new SeaTableV1(),
|
||||
1: new SeaTableV1(baseDescription),
|
||||
2: new SeaTableV2(baseDescription),
|
||||
};
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import type {
|
|||
INodePropertyOptions,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
INodeTypeBaseDescription,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
|
@ -21,50 +22,20 @@ import {
|
|||
updateAble,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import { rowFields, rowOperations } from './RowDescription';
|
||||
|
||||
import type { TColumnsUiValues, TColumnValue } from './types';
|
||||
|
||||
import type { ICtx, IRow, IRowObject } from './Interfaces';
|
||||
import { versionDescription } from './VersionDescription';
|
||||
|
||||
export class SeaTableV1 implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'SeaTable',
|
||||
name: 'seaTable',
|
||||
icon: 'file:seaTable.svg',
|
||||
group: ['input'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
|
||||
description: 'Consume the SeaTable API',
|
||||
defaults: {
|
||||
name: 'SeaTable',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
credentials: [
|
||||
{
|
||||
name: 'seaTableApi',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
options: [
|
||||
{
|
||||
name: 'Row',
|
||||
value: 'row',
|
||||
},
|
||||
],
|
||||
default: 'row',
|
||||
},
|
||||
...rowOperations,
|
||||
...rowFields,
|
||||
],
|
||||
};
|
||||
description: INodeTypeDescription;
|
||||
|
||||
constructor(baseDescription: INodeTypeBaseDescription) {
|
||||
this.description = {
|
||||
...baseDescription,
|
||||
...versionDescription,
|
||||
};
|
||||
}
|
||||
|
||||
methods = {
|
||||
loadOptions: {
|
||||
|
|
40
packages/nodes-base/nodes/SeaTable/v1/VersionDescription.ts
Normal file
40
packages/nodes-base/nodes/SeaTable/v1/VersionDescription.ts
Normal file
|
@ -0,0 +1,40 @@
|
|||
import type { INodeTypeDescription } from 'n8n-workflow';
|
||||
import { rowFields, rowOperations } from './RowDescription';
|
||||
|
||||
export const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'SeaTable',
|
||||
name: 'seaTable',
|
||||
icon: 'file:seaTable.svg',
|
||||
group: ['input'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
|
||||
description: 'Consume the SeaTable API',
|
||||
defaults: {
|
||||
name: 'SeaTable',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
credentials: [
|
||||
{
|
||||
name: 'seaTableApi',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
options: [
|
||||
{
|
||||
name: 'Row',
|
||||
value: 'row',
|
||||
},
|
||||
],
|
||||
default: 'row',
|
||||
},
|
||||
...rowOperations,
|
||||
...rowFields,
|
||||
],
|
||||
};
|
Loading…
Reference in a new issue