n8n/packages/nodes-base/nodes/Aws/S3/BucketDescription.ts

356 lines
7.5 KiB
TypeScript
Raw Normal View History

2020-04-15 15:42:37 -07:00
import {
INodeProperties,
} from 'n8n-workflow';
export const bucketOperations: INodeProperties[] = [
2020-04-15 15:42:37 -07:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'bucket',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a bucket',
2020-04-15 15:42:37 -07:00
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a bucket',
},
2020-04-15 15:42:37 -07:00
{
name: 'Get All',
value: 'getAll',
description: 'Get all buckets',
},
{
name: 'Search',
value: 'search',
description: 'Search within a bucket',
2020-04-15 15:42:37 -07:00
},
],
default: 'create',
description: 'The operation to perform.',
},
];
2020-04-15 15:42:37 -07:00
export const bucketFields: INodeProperties[] = [
2020-04-15 15:42:37 -07:00
/* -------------------------------------------------------------------------- */
/* bucket:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'bucket',
],
operation: [
'create',
],
},
},
description: 'A succinct description of the nature, symptoms, cause, or effect of the bucket',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
resource: [
'bucket',
],
operation: [
'create',
],
},
},
default: {},
options: [
{
displayName: 'ACL',
name: 'acl',
type: 'options',
options: [
{
name: 'Authenticated Read',
value: 'authenticatedRead',
},
{
name: 'Private',
value: 'Private',
},
{
name: 'Public Read',
value: 'publicRead',
},
{
name: 'Public Read Write',
value: 'publicReadWrite',
},
],
default: '',
description: 'The canned ACL to apply to the bucket',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Bucket Object Lock Enabled',
name: 'bucketObjectLockEnabled',
type: 'boolean',
default: false,
description: 'Specifies whether you want S3 Object Lock to be enabled for the new bucket',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Grant Full Control',
name: 'grantFullControl',
type: 'boolean',
default: false,
description: 'Allows grantee the read, write, read ACP, and write ACP permissions on the bucket',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Grant Read',
name: 'grantRead',
type: 'boolean',
default: false,
description: 'Allows grantee to list the objects in the bucket',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Grant Read ACP',
name: 'grantReadAcp',
type: 'boolean',
default: false,
description: 'Allows grantee to read the bucket ACL',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Grant Write',
name: 'grantWrite',
type: 'boolean',
default: false,
description: 'Allows grantee to create, overwrite, and delete any object in the bucket',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Grant Write ACP',
name: 'grantWriteAcp',
type: 'boolean',
default: false,
description: 'Allows grantee to write the ACL for the applicable bucket',
2020-04-15 15:42:37 -07:00
},
2020-04-20 17:33:38 -07:00
{
displayName: 'Region',
name: 'region',
type: 'string',
default: '',
description: 'Region you want to create the bucket in, by default the buckets are created on the region defined on the credentials',
2020-04-20 17:33:38 -07:00
},
2020-04-15 15:42:37 -07:00
],
},
/* -------------------------------------------------------------------------- */
/* bucket:delete */
/* -------------------------------------------------------------------------- */
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'bucket',
],
operation: [
'delete',
],
},
},
description: 'Name of the AWS S3 bucket to delete',
},
2020-04-15 15:42:37 -07:00
/* -------------------------------------------------------------------------- */
/* bucket:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'bucket',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'bucket',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'Max number of results to return',
2020-04-15 15:42:37 -07:00
},
/* -------------------------------------------------------------------------- */
/* bucket:search */
/* -------------------------------------------------------------------------- */
{
displayName: 'Bucket Name',
name: 'bucketName',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'bucket',
],
operation: [
'search',
],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: [
'search',
],
resource: [
'bucket',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: [
'search',
],
resource: [
'bucket',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'Max number of results to return',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
resource: [
'bucket',
],
operation: [
'search',
],
},
},
default: {},
options: [
{
displayName: 'Delimiter',
name: 'delimiter',
type: 'string',
default: '',
description: 'A delimiter is a character you use to group keys',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Encoding Type',
name: 'encodingType',
type: 'options',
options: [
{
name: 'URL',
value: 'url',
},
],
default: '',
description: 'Encoding type used by Amazon S3 to encode object keys in the response',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Fetch Owner',
name: 'fetchOwner',
type: 'boolean',
default: false,
description: 'The owner field is not present in listV2 by default, if you want to return owner field with each key in the result then set the fetch owner field to true',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Prefix',
name: 'prefix',
type: 'string',
default: '',
description: 'Limits the response to keys that begin with the specified prefix',
2020-04-15 15:42:37 -07:00
},
{
displayName: 'Requester Pays',
name: 'requesterPays',
type: 'boolean',
default: false,
description: 'Weather the requester will pay for requests and data transfer. While Requester Pays is enabled, anonymous access to this bucket is disabled.',
},
{
displayName: 'Start After',
name: 'startAfter',
type: 'string',
default: '',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key.',
2020-04-15 15:42:37 -07:00
},
],
},
];