Add control operations
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
61
packages/n8n-node/nodes/Probo/actions/control/index.ts
Normal file
61
packages/n8n-node/nodes/Probo/actions/control/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import * as createOp from './create.operation';
|
||||
import * as updateOp from './update.operation';
|
||||
import * as deleteOp from './delete.operation';
|
||||
import * as getOp from './get.operation';
|
||||
import * as getAllOp from './getAll.operation';
|
||||
|
||||
export const description: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['control'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a new control',
|
||||
action: 'Create a control',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete a control',
|
||||
action: 'Delete a control',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a control',
|
||||
action: 'Get a control',
|
||||
},
|
||||
{
|
||||
name: 'Get All',
|
||||
value: 'getAll',
|
||||
description: 'Get all controls',
|
||||
action: 'Get all controls',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
description: 'Update an existing control',
|
||||
action: 'Update a control',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
},
|
||||
...createOp.description,
|
||||
...updateOp.description,
|
||||
...deleteOp.description,
|
||||
...getOp.description,
|
||||
...getAllOp.description,
|
||||
];
|
||||
|
||||
export { createOp as create, updateOp as update, deleteOp as delete, getOp as get, getAllOp as getAll };
|
||||
|
||||
Reference in New Issue
Block a user