n8n/packages/nodes-base/nodes/Google/Chat/descriptions/MediaDescription.ts
Iván Ovejero b03e358a12
refactor: Integrate consistent-type-imports in nodes-base (no-changelog) (#5267)
* 👕 Enable `consistent-type-imports` for nodes-base

* 👕 Apply to nodes-base

*  Undo unrelated changes

* 🚚 Move to `.eslintrc.js` in nodes-base

*  Revert "Enable `consistent-type-imports` for nodes-base"

This reverts commit 529ad72b05.

* 👕 Fix severity
2023-01-27 12:22:44 +01:00

59 lines
1.3 KiB
TypeScript

import type { INodeProperties } from 'n8n-workflow';
export const mediaOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
noDataExpression: true,
type: 'options',
displayOptions: {
show: {
resource: ['media'],
},
},
options: [
{
name: 'Download',
value: 'download',
description: 'Download media',
action: 'Download media',
},
],
default: 'download',
},
];
export const mediaFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* media:download */
/* -------------------------------------------------------------------------- */
{
displayName: 'Resource Name',
name: 'resourceName',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['media'],
operation: ['download'],
},
},
default: '',
description: 'Name of the media that is being downloaded',
},
{
displayName: 'Binary Property',
name: 'binaryPropertyName',
type: 'string',
default: 'data',
required: true,
displayOptions: {
show: {
resource: ['media'],
operation: ['download'],
},
},
description: 'Name of the binary property to which to write the data of the read file',
},
];