mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 22:54:05 -08:00
e07da55a1a
* Updated Dropdown Descriptions to match documentation * Removed full stops and hyphens in field descriptions * Removed hyphen on description on line 267 * Fixed typographical errors for Github node * Fixed typo for Zoom Credentials * Changed Postgres node description to match Postgres docs (https://github.com/n8n-io/n8n-docs/pull/30) * Changed Rocketchat displayname to RocketChat * Fixed typographical errors (and matched with docs) for Trello node descriptions * Updated Jira node descriptions to match docs
277 lines
4.7 KiB
TypeScript
277 lines
4.7 KiB
TypeScript
import { INodeProperties } from "n8n-workflow";
|
|
|
|
export const attachmentOperations = [
|
|
// ----------------------------------
|
|
// attachment
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Create',
|
|
value: 'create',
|
|
description: 'Create a new attachment for a card',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
description: 'Delete an attachment',
|
|
},
|
|
{
|
|
name: 'Get',
|
|
value: 'get',
|
|
description: 'Get the data of an attachment',
|
|
},
|
|
{
|
|
name: 'Get All',
|
|
value: 'getAll',
|
|
description: 'Returns all attachments for the card',
|
|
}
|
|
],
|
|
default: 'getAll',
|
|
description: 'The operation to perform.',
|
|
},
|
|
|
|
] as INodeProperties[];
|
|
|
|
export const attachmentFields = [
|
|
|
|
// ----------------------------------
|
|
// attachment:create
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Card ID',
|
|
name: 'cardId',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'create',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
description: 'The ID of the card to add attachment to.',
|
|
},
|
|
{
|
|
displayName: 'Source URL',
|
|
name: 'url',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'create',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
description: 'The URL of the attachment to add.',
|
|
},
|
|
{
|
|
displayName: 'Additional Fields',
|
|
name: 'additionalFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'create',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
displayName: 'MIME Type',
|
|
name: 'mimeType',
|
|
type: 'string',
|
|
default: '',
|
|
placeholder: 'image/png',
|
|
description: 'The MIME type of the attachment to add.',
|
|
},
|
|
{
|
|
displayName: 'Name',
|
|
name: 'name',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'The name of the attachment to add.',
|
|
},
|
|
],
|
|
},
|
|
|
|
// ----------------------------------
|
|
// attachment:delete
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Card ID',
|
|
name: 'cardId',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'delete',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
description: 'The ID of the card that attachment belongs to.',
|
|
},
|
|
{
|
|
displayName: 'Attachment ID',
|
|
name: 'id',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'delete',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
description: 'The ID of the attachment to delete.',
|
|
},
|
|
|
|
// ----------------------------------
|
|
// attachment:getAll
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Card ID',
|
|
name: 'cardId',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
description: 'The ID of the card to get attachments.',
|
|
},
|
|
{
|
|
displayName: 'Additional Fields',
|
|
name: 'additionalFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
displayName: 'Fields',
|
|
name: 'fields',
|
|
type: 'string',
|
|
default: 'all',
|
|
description: 'Fields to return. Either "all" or a comma-separated list of fields.',
|
|
},
|
|
],
|
|
},
|
|
|
|
// ----------------------------------
|
|
// attachment:get
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Card ID',
|
|
name: 'cardId',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'get',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
description: 'The ID of the card to get attachment.',
|
|
},
|
|
{
|
|
displayName: 'Attachment ID',
|
|
name: 'id',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'get',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
description: 'The ID of the attachment to get.',
|
|
},
|
|
{
|
|
displayName: 'Additional Fields',
|
|
name: 'additionalFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'get',
|
|
],
|
|
resource: [
|
|
'attachment',
|
|
],
|
|
},
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
displayName: 'Fields',
|
|
name: 'fields',
|
|
type: 'string',
|
|
default: 'all',
|
|
description: 'Fields to return. Either "all" or a comma-separated list of fields.',
|
|
},
|
|
],
|
|
},
|
|
|
|
] as INodeProperties[];
|