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 checklistItemOperations: 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: ['checklistItem'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a checklist item',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a checklist item',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a checklist item',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete a checklist item',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
|
|
|
description: 'Update a checklist item',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Update a checklist item',
|
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 checklistItemFields: INodeProperties[] = [
|
2021-03-24 15:01:12 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* checklistItem:create */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
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: ['checklistItem'],
|
|
|
|
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: ['checklistItem'],
|
|
|
|
operation: ['create'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklistItem'],
|
|
|
|
operation: ['create'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Assignee ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'assignee',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-03-24 15:01:12 -07:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* checklistItem: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: ['checklistItem'],
|
|
|
|
operation: ['delete'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Checklist Item ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'checklistItem',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklistItem'],
|
|
|
|
operation: ['delete'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
2021-03-24 15:01:12 -07:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* checklistItem: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: ['checklistItem'],
|
|
|
|
operation: ['update'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Checklist Item ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'checklistItem',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['checklistItem'],
|
|
|
|
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: ['checklistItem'],
|
|
|
|
operation: ['update'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Assignee ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'assignee',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Parent Checklist Item ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'parent',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Checklist item that you want to nest the target checklist item underneath',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Resolved',
|
|
|
|
name: 'resolved',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|