Files
alighasami 3d5eaf9445
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
first commit
2026-03-17 16:22:57 +03:30

45 lines
1.0 KiB
TypeScript

import type {
IDisplayOptions,
IExecuteFunctions,
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { DATA_TABLE_ID_FIELD } from '../../common/fields';
import { getDataTableProxyExecute } from '../../common/utils';
export const FIELD = 'delete';
const displayOptions: IDisplayOptions = {
show: {
resource: ['table'],
operation: [FIELD],
},
};
export const description: INodeProperties[] = [
{
displayName:
'This will permanently delete the data table and all its data. This action cannot be undone.',
name: 'deleteWarning',
type: 'notice',
default: '',
displayOptions,
},
];
export async function execute(
this: IExecuteFunctions,
index: number,
): Promise<INodeExecutionData[]> {
const dataTableId = this.getNodeParameter(DATA_TABLE_ID_FIELD, index, undefined, {
extractValue: true,
}) as string;
const dataTableProxy = await getDataTableProxyExecute(this, index);
const success = await dataTableProxy.deleteDataTable();
return [{ json: { success, deletedTableId: dataTableId } }];
}