n8n/packages/nodes-base/nodes/HelpScout/MailboxDescription.ts

98 lines
1.9 KiB
TypeScript
Raw Normal View History

2020-03-29 10:10:54 -07:00
import { INodeProperties } from 'n8n-workflow';
2020-03-16 19:02:48 -07:00
export const mailboxOperations: INodeProperties[] = [
2020-03-16 19:02:48 -07:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'mailbox',
],
},
},
options: [
{
name: 'Get',
value: 'get',
description: 'Get data of a mailbox',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all mailboxes',
},
],
default: 'get',
description: 'The operation to perform.',
},
];
2020-03-16 19:02:48 -07:00
export const mailboxFields: INodeProperties[] = [
2020-03-16 19:02:48 -07:00
/* -------------------------------------------------------------------------- */
/* mailbox:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'Mailbox ID',
name: 'mailboxId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'mailbox',
],
operation: [
'get',
],
},
},
},
2020-03-29 19:08:00 -07:00
/* -------------------------------------------------------------------------- */
/* mailbox:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'mailbox',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
2020-03-29 19:08:00 -07:00
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'mailbox',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
},
default: 50,
description: 'Max number of results to return',
2020-03-29 19:08:00 -07:00
},
];