2020-04-20 07:35:58 -07:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
2021-03-24 15:01:12 -07:00
|
|
|
} 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',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a checklist item',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a checklist item',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
|
|
|
description: 'Update a checklist item',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'create',
|
|
|
|
description: 'The operation to perform.',
|
|
|
|
},
|
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[] = [
|
2020-04-20 07:35:58 -07:00
|
|
|
|
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: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
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: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'delete',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
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: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'delete',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
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: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
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: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Update Fields',
|
|
|
|
name: 'updateFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'checklistItem',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
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: '',
|
|
|
|
description: 'Checklist item that you want to nest the target checklist item underneath.',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Resolved',
|
|
|
|
name: 'resolved',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|