n8n/packages/nodes-base/nodes/Orbit/NoteDescription.ts
Iván Ovejero 6f95121fac
refactor: Add action to all operations on all nodes (#3655)
* 👕 Add `action` to `INodePropertyOptions`

* 👕 Apply `node-param-operation-option-without-action`

* ✏️ Fix add/remove phrasing

* ✏️ Fix email template phrasing

* ✏️ Fix add/remove phrasing

* ✏️ Fix custom fields phrasing

* ✏️ Fix job report phrasing

* ✏️ Fix query phrasing

* ✏️ Various phrasing fixes

* ✏️ Fix final phrasings

* ✏️ Remove `conversation`

* ✏️ Fix plural
2022-07-10 23:50:51 +03:00

278 lines
4.9 KiB
TypeScript

import {
INodeProperties,
} from 'n8n-workflow';
export const noteOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: [
'note',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a note',
action: 'Create a note',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all notes for a member',
action: 'Get all notes',
},
{
name: 'Update',
value: 'update',
description: 'Update a note',
action: 'Update a note',
},
],
default: 'create',
},
];
export const noteFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* note:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'Workspace Name or ID',
name: 'workspaceId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
typeOptions: {
loadOptionsMethod: 'getWorkspaces',
},
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Member ID',
name: 'memberId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Note',
name: 'note',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'create',
],
},
},
},
/* -------------------------------------------------------------------------- */
/* note:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Workspace Name or ID',
name: 'workspaceId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
typeOptions: {
loadOptionsMethod: 'getWorkspaces',
},
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Member ID',
name: 'memberId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'getAll',
],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'note',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'note',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'Max number of results to return',
},
{
displayName: 'Resolve Member',
name: 'resolveMember',
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'note',
],
},
},
default: false,
},
/* -------------------------------------------------------------------------- */
/* note:update */
/* -------------------------------------------------------------------------- */
{
displayName: 'Workspace Name or ID',
name: 'workspaceId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
typeOptions: {
loadOptionsMethod: 'getWorkspaces',
},
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Member ID',
name: 'memberId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Note ID',
name: 'noteId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'update',
],
},
},
},
{
displayName: 'Note',
name: 'note',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'note',
],
operation: [
'update',
],
},
},
},
];