refactor: Format nodes-base package (A-F) (#3800)

* 🔨 prettier formated nodes - A

* 🔨 prettier formated nodes - B

*  prettier formated nodes - C

*  prettier formated nodes - D

*  prettier formated nodes - E-F

* 🎨 Adjust nodes-base formatting command (#3805)

* Format additional files in nodes A-F (#3811)

*  fixes

* 🎨 Add Mindee to ignored dirs

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
Michael Kret
2022-08-01 23:47:55 +03:00
committed by GitHub
parent 2c17e6f3ca
commit 0ecbb4a19d
411 changed files with 12906 additions and 20148 deletions

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const folderOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const folderOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'folder',
],
resource: ['folder'],
},
},
options: [
@@ -58,7 +54,6 @@ export const folderOperations: INodeProperties[] = [
];
export const folderFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* folder:create */
/* -------------------------------------------------------------------------- */
@@ -69,16 +64,12 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'folder',
],
operation: ['create'],
resource: ['folder'],
},
},
default: '',
description: 'Folder\'s name',
description: "Folder's name",
},
{
displayName: 'Parent ID',
@@ -86,16 +77,13 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'folder',
],
operation: ['create'],
resource: ['folder'],
},
},
default: '',
description: 'ID of the folder you want to create the new folder in. if not defined it will be created on the root folder.',
description:
'ID of the folder you want to create the new folder in. if not defined it will be created on the root folder.',
},
{
displayName: 'Options',
@@ -103,12 +91,8 @@ export const folderFields: INodeProperties[] = [
type: 'collection',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'folder',
],
operation: ['create'],
resource: ['folder'],
},
},
default: {},
@@ -122,7 +106,8 @@ export const folderFields: INodeProperties[] = [
{
name: 'Collaborators',
value: 'collaborators',
description: 'Only emails from registered email addresses for collaborators will be accepted',
description:
'Only emails from registered email addresses for collaborators will be accepted',
},
{
name: 'Open',
@@ -138,7 +123,8 @@ export const folderFields: INodeProperties[] = [
name: 'fields',
type: 'string',
default: '',
description: 'A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.',
description:
'A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.',
},
],
},
@@ -152,12 +138,8 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'folder',
],
operation: ['get'],
resource: ['folder'],
},
},
default: '',
@@ -172,12 +154,8 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'delete',
],
resource: [
'folder',
],
operation: ['delete'],
resource: ['folder'],
},
},
default: '',
@@ -188,16 +166,13 @@ export const folderFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
operation: [
'delete',
],
resource: [
'folder',
],
operation: ['delete'],
resource: ['folder'],
},
},
default: false,
description: 'Whether to delete a folder that is not empty by recursively deleting the folder and all of its content',
description:
'Whether to delete a folder that is not empty by recursively deleting the folder and all of its content',
},
/* -------------------------------------------------------------------------- */
@@ -209,16 +184,13 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'search',
],
resource: [
'folder',
],
operation: ['search'],
resource: ['folder'],
},
},
default: '',
description: 'The string to search for. This query is matched against item names, descriptions, text content of files, and various other fields of the different item types.',
description:
'The string to search for. This query is matched against item names, descriptions, text content of files, and various other fields of the different item types.',
},
{
displayName: 'Return All',
@@ -226,12 +198,8 @@ export const folderFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
operation: [
'search',
],
resource: [
'folder',
],
operation: ['search'],
resource: ['folder'],
},
},
default: false,
@@ -243,15 +211,9 @@ export const folderFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
operation: [
'search',
],
resource: [
'folder',
],
returnAll: [
false,
],
operation: ['search'],
resource: ['folder'],
returnAll: [false],
},
},
typeOptions: {
@@ -268,12 +230,8 @@ export const folderFields: INodeProperties[] = [
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'search',
],
resource: [
'folder',
],
operation: ['search'],
resource: ['folder'],
},
},
default: {},
@@ -283,7 +241,8 @@ export const folderFields: INodeProperties[] = [
name: 'contet_types',
type: 'string',
default: '',
description: 'Limits search results to items with the given content types. Content types are defined as a comma-separated lists of Box recognized content types.',
description:
'Limits search results to items with the given content types. Content types are defined as a comma-separated lists of Box recognized content types.',
},
{
displayName: 'Created At Range',
@@ -330,14 +289,16 @@ export const folderFields: INodeProperties[] = [
},
],
default: '',
description: 'Defines the direction in which search results are ordered. Default value is DESC.',
description:
'Defines the direction in which search results are ordered. Default value is DESC.',
},
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: '',
description: 'A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.',
description:
'A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.',
},
{
displayName: 'File Extensions',
@@ -352,7 +313,8 @@ export const folderFields: INodeProperties[] = [
name: 'ancestor_folder_ids',
type: 'string',
default: '',
description: 'Limits search results to items within the given list of folders. Folders are defined as a comma-separated lists of folder IDs.',
description:
'Limits search results to items within the given list of folders. Folders are defined as a comma-separated lists of folder IDs.',
},
{
displayName: 'Scope',
@@ -377,7 +339,8 @@ export const folderFields: INodeProperties[] = [
type: 'string',
default: '',
placeholder: '1000000,5000000',
description: 'Limits search results to items within a given file size range. File size ranges are defined as comma-separated byte sizes.',
description:
'Limits search results to items within a given file size range. File size ranges are defined as comma-separated byte sizes.',
},
{
displayName: 'Sort',
@@ -394,7 +357,8 @@ export const folderFields: INodeProperties[] = [
},
],
default: 'relevance',
description: 'Returns the results ordered in descending order by date at which the item was last modified',
description:
'Returns the results ordered in descending order by date at which the item was last modified',
},
{
displayName: 'Trash Content',
@@ -448,7 +412,8 @@ export const folderFields: INodeProperties[] = [
name: 'owner_user_ids',
type: 'string',
default: '',
description: 'Limits search results to items owned by the given list of owners. Owners are defined as a comma-separated list of user IDs.',
description:
'Limits search results to items owned by the given list of owners. Owners are defined as a comma-separated list of user IDs.',
},
],
},
@@ -462,12 +427,8 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'folder',
],
operation: ['share'],
resource: ['folder'],
},
},
default: '',
@@ -489,12 +450,8 @@ export const folderFields: INodeProperties[] = [
],
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'folder',
],
operation: ['share'],
resource: ['folder'],
},
},
default: 'user',
@@ -506,15 +463,9 @@ export const folderFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'folder',
],
accessibleBy: [
'user',
],
operation: ['share'],
resource: ['folder'],
accessibleBy: ['user'],
},
},
default: true,
@@ -527,22 +478,14 @@ export const folderFields: INodeProperties[] = [
placeholder: 'name@email.com',
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'folder',
],
accessibleBy: [
'user',
],
useEmail: [
true,
],
operation: ['share'],
resource: ['folder'],
accessibleBy: ['user'],
useEmail: [true],
},
},
default: '',
description: 'The user\'s email address to share the folder with',
description: "The user's email address to share the folder with",
},
{
displayName: 'User ID',
@@ -550,22 +493,14 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'folder',
],
accessibleBy: [
'user',
],
useEmail: [
false,
],
operation: ['share'],
resource: ['folder'],
accessibleBy: ['user'],
useEmail: [false],
},
},
default: '',
description: 'The user\'s ID to share the folder with',
description: "The user's ID to share the folder with",
},
{
displayName: 'Group ID',
@@ -573,19 +508,13 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'folder',
],
accessibleBy: [
'group',
],
operation: ['share'],
resource: ['folder'],
accessibleBy: ['group'],
},
},
default: '',
description: 'The group\'s ID to share the folder with',
description: "The group's ID to share the folder with",
},
{
displayName: 'Role',
@@ -630,12 +559,8 @@ export const folderFields: INodeProperties[] = [
],
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'folder',
],
operation: ['share'],
resource: ['folder'],
},
},
default: 'editor',
@@ -648,12 +573,8 @@ export const folderFields: INodeProperties[] = [
placeholder: 'Add Option',
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'folder',
],
operation: ['share'],
resource: ['folder'],
},
},
default: {},
@@ -663,21 +584,24 @@ export const folderFields: INodeProperties[] = [
name: 'can_view_path',
type: 'boolean',
default: false,
description: 'Whether the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore cannot see content the user is not collaborated on.',
description:
'Whether the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore cannot see content the user is not collaborated on.',
},
{
displayName: 'Expires At',
name: 'expires_at',
type: 'dateTime',
default: '',
description: 'Set the expiration date for the collaboration. At this date, the collaboration will be automatically removed from the item.',
description:
'Set the expiration date for the collaboration. At this date, the collaboration will be automatically removed from the item.',
},
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: '',
description: 'A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.',
description:
'A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.',
},
{
displayName: 'Notify',
@@ -699,12 +623,8 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'folder',
],
operation: ['update'],
resource: ['folder'],
},
},
default: '',
@@ -715,12 +635,8 @@ export const folderFields: INodeProperties[] = [
type: 'collection',
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'folder',
],
operation: ['update'],
resource: ['folder'],
},
},
default: {},
@@ -731,14 +647,16 @@ export const folderFields: INodeProperties[] = [
name: 'can_non_owners_invite',
type: 'boolean',
default: false,
description: 'Whether users who are not the owner of the folder can invite new collaborators to the folder',
description:
'Whether users who are not the owner of the folder can invite new collaborators to the folder',
},
{
displayName: 'Can Non-Owners View Colaborators',
name: 'can_non_owners_view_collaborators',
type: 'boolean',
default: false,
description: 'Whether to restrict collaborators who are not the owner of this folder from viewing other collaborations on this folder',
description:
'Whether to restrict collaborators who are not the owner of this folder from viewing other collaborations on this folder',
},
{
displayName: 'Description',
@@ -752,14 +670,16 @@ export const folderFields: INodeProperties[] = [
name: 'fields',
type: 'string',
default: '',
description: 'A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.',
description:
'A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.',
},
{
displayName: 'Is Collaboration Restricted To Enterprise',
name: 'is_collaboration_restricted_to_enterprise',
type: 'boolean',
default: false,
description: 'Whether new invites to this folder are restricted to users within the enterprise. This does not affect existing collaborations.',
description:
'Whether new invites to this folder are restricted to users within the enterprise. This does not affect existing collaborations.',
},
{
displayName: 'Name',
@@ -773,7 +693,8 @@ export const folderFields: INodeProperties[] = [
name: 'parentId',
type: 'string',
default: '',
description: 'The parent folder for this folder. Use this to move the folder or to restore it out of the trash.',
description:
'The parent folder for this folder. Use this to move the folder or to restore it out of the trash.',
},
{
displayName: 'Shared Link',
@@ -815,13 +736,12 @@ export const folderFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
access: [
'open',
],
access: ['open'],
},
},
default: '',
description: 'The password required to access the shared link. Set the password to null to remove it.',
description:
'The password required to access the shared link. Set the password to null to remove it.',
},
{
displayName: 'Permissions',
@@ -849,7 +769,8 @@ export const folderFields: INodeProperties[] = [
name: 'vanity_name',
type: 'string',
default: '',
description: 'Defines a custom vanity name to use in the shared link URL, for example https://app.box.com/v/my-shared-link',
description:
'Defines a custom vanity name to use in the shared link URL, for example https://app.box.com/v/my-shared-link',
},
],
},
@@ -858,7 +779,8 @@ export const folderFields: INodeProperties[] = [
name: 'tags',
type: 'string',
default: '',
description: 'The tags for this item. These tags are shown in the Box web app and mobile apps next to an item.',
description:
'The tags for this item. These tags are shown in the Box web app and mobile apps next to an item.',
},
],
},