2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2022-03-20 01:54:31 -07:00
export const options = {
displayName : 'Options' ,
placeholder : 'Add Option' ,
name : 'formatOptions' ,
type : 'collection' ,
default : { } ,
options : [
2022-05-14 02:20:45 -07:00
{
displayName : 'Download Attachments' ,
name : 'download' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether to download submitted attachments' ,
2022-05-14 02:20:45 -07:00
} ,
{
displayName : 'Attachments Naming Scheme' ,
name : 'binaryNamingScheme' ,
type : 'options' ,
default : 'sequence' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
download : [ true ] ,
2022-05-14 02:20:45 -07:00
} ,
} ,
options : [
{
name : 'Sequence (e.g. attachment_N)' ,
value : 'sequence' ,
} ,
{
name : 'Use Original Form Question ID' ,
value : 'question' ,
} ,
] ,
} ,
2022-03-20 01:54:31 -07:00
{
displayName : 'Attachments Prefix' ,
name : 'dataPropertyAttachmentsPrefixName' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
download : [ true ] ,
binaryNamingScheme : [ 'sequence' ] ,
2022-03-20 01:54:31 -07:00
} ,
} ,
default : 'attachment_' ,
2022-08-17 08:50:24 -07:00
description :
'Prefix for name of the binary property to which to write the attachments. An index starting with 0 will be added. So if name is "attachment_" the first attachment is saved to "attachment_0"' ,
2022-03-20 01:54:31 -07:00
} ,
{
displayName : 'File Size' ,
name : 'version' ,
type : 'options' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
download : [ true ] ,
2022-03-20 01:54:31 -07:00
} ,
} ,
default : 'download_url' ,
description : 'Attachment size to retrieve, if multiple versions are available' ,
options : [
{
name : 'Original' ,
value : 'download_url' ,
} ,
{
name : 'Small' ,
value : 'download_small_url' ,
} ,
{
name : 'Medium' ,
value : 'download_medium_url' ,
} ,
{
name : 'Large' ,
value : 'download_large_url' ,
} ,
] ,
} ,
{
displayName : 'Multiselect Mask' ,
name : 'selectMask' ,
type : 'string' ,
default : 'select_*' ,
2022-08-17 08:50:24 -07:00
description :
'Comma-separated list of wildcard-style selectors for fields that should be treated as multiselect fields, i.e. parsed as arrays.' ,
2022-03-20 01:54:31 -07:00
} ,
{
displayName : 'Number Mask' ,
name : 'numberMask' ,
type : 'string' ,
default : 'n_*, f_*' ,
2022-08-17 08:50:24 -07:00
description :
'Comma-separated list of wildcard-style selectors for fields that should be treated as numbers' ,
2022-03-20 01:54:31 -07:00
} ,
{
displayName : 'Reformat' ,
name : 'reformat' ,
type : 'boolean' ,
default : false ,
2022-08-17 08:50:24 -07:00
description :
'Whether to apply some reformatting to the submission data, such as parsing GeoJSON coordinates' ,
2022-03-20 01:54:31 -07:00
} ,
] ,
} as INodeProperties ;