2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeProperties } from 'n8n-workflow';
|
2020-04-20 07:35:58 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const checklistOperations: INodeProperties[] = [
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-04-20 07:35:58 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklist'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a checklist',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a checklist',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a checklist',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete a checklist',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
|
|
|
description: 'Update a checklist',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Update a checklist',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'create',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-04-20 07:35:58 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const checklistFields: INodeProperties[] = [
|
2021-03-24 15:01:12 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* checklist:create */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
|
|
|
displayName: 'Task ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'task',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklist'],
|
|
|
|
operation: ['create'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklist'],
|
|
|
|
operation: ['create'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
2021-03-24 15:01:12 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* checklist:delete */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
|
|
|
displayName: 'Checklist ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'checklist',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklist'],
|
|
|
|
operation: ['delete'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
2021-03-24 15:01:12 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* checklist:update */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
|
|
|
displayName: 'Checklist ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'checklist',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklist'],
|
|
|
|
operation: ['update'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Update Fields',
|
|
|
|
name: 'updateFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklist'],
|
|
|
|
operation: ['update'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Position',
|
|
|
|
name: 'position',
|
|
|
|
type: 'number',
|
|
|
|
typeOptions: {
|
|
|
|
minValue: 0,
|
|
|
|
},
|
|
|
|
default: 0,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|