2022-08-17 08:50:24 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
2022-02-19 02:18:43 -08:00
|
|
|
|
|
|
|
export const attachmentOperations: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
noDataExpression: true,
|
|
|
|
type: 'options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['attachment'],
|
2022-02-19 02:18:43 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
2022-08-17 08:50:24 -07:00
|
|
|
description:
|
|
|
|
'Gets the metadata of a message attachment. The attachment data is fetched using the media API.',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get an attachment',
|
2022-02-19 02:18:43 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'get',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2022-08-17 08:50:24 -07:00
|
|
|
export const attachmentFields: INodeProperties[] = [
|
2022-02-19 02:18:43 -08:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* attachments:get */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Attachment Name',
|
|
|
|
name: 'attachmentName',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['attachment'],
|
|
|
|
operation: ['get'],
|
2022-02-19 02:18:43 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
description: 'Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*"',
|
|
|
|
},
|
|
|
|
];
|