description:'If all fields should be send to Airtable or only specific ones.',
},
{
displayName:'Fields',
name:'fields',
type:'string',
typeOptions:{
multipleValues: true,
multipleValueButtonText:'Add Field',
},
displayOptions:{
show:{
addAllFields:[
false,
],
operation:[
'append',
],
},
},
default:'',
placeholder:'Name',
required: true,
description:'The name of fields of which the data should be send to Airtable.',
},
// ----------------------------------
// delete
// ----------------------------------
{
displayName:'Id',
name:'id',
type:'string',
displayOptions:{
show:{
operation:[
'delete',
],
},
},
default:'',
required: true,
description:'Id of the record to delete.',
},
// ----------------------------------
// list
// ----------------------------------
{
displayName:'Return All',
name:'returnAll',
type:'boolean',
displayOptions:{
show:{
operation:[
'list',
],
},
},
default:true,
description:'If all results should be returned or only up to a given limit.',
},
{
displayName:'Limit',
name:'limit',
type:'number',
displayOptions:{
show:{
operation:[
'list',
],
returnAll:[
false,
],
},
},
typeOptions:{
minValue: 1,
maxValue: 100,
},
default:100,
description:'How many results to return.',
},
{
displayName:'Additional Options',
name:'additionalOptions',
type:'collection',
displayOptions:{
show:{
operation:[
'list'
],
},
},
default:{},
description:'Additional options which decide which records should be returned',
placeholder:'Add Option',
options:[
{
displayName:'Fields',
name:'fields',
type:'string',
typeOptions:{
multipleValues: true,
multipleValueButtonText:'Add Field',
},
default:'',
placeholder:'Name',
description:'Only data for fields whose names are in this list will be included in the records.',
},
{
displayName:'Filter By Formula',
name:'filterByFormula',
type:'string',
default:'',
placeholder:'NOT({Name} = \'\')',
description:'A formula used to filter records. The formula will be evaluated for each<br />record, and if the result is not 0, false, "", NaN, [], or #Error!<br />the record will be included in the response.',
},
{
displayName:'Sort',
name:'sort',
placeholder:'Add Sort Rule',
description:'Defines how the returned records should be ordered.',
type:'fixedCollection',
typeOptions:{
multipleValues: true,
},
default:{},
options:[
{
name:'property',
displayName:'Property',
values:[
{
displayName:'Field',
name:'field',
type:'string',
default:'',
description:'Name of the field to sort on.',
},
{
displayName:'Direction',
name:'direction',
type:'options',
options:[
{
name:'ASC',
value:'asc',
description:'Sort in ascending order (small -> large)',
},
{
name:'DESC',
value:'desc',
description:'Sort in descending order (large -> small)'
},
],
default:'asc',
description:'The sort direction.',
},
]
},
],
},
{
displayName:'View',
name:'view',
type:'string',
default:'',
placeholder:'All Stories',
description:'The name or ID of a view in the Stories table. If set,<br />only the records in that view will be returned. The records<br />will be sorted according to the order of the view.',
},
],
},
// ----------------------------------
// read
// ----------------------------------
{
displayName:'Id',
name:'id',
type:'string',
displayOptions:{
show:{
operation:[
'read',
],
},
},
default:'',
required: true,
description:'Id of the record to return.',
},
// ----------------------------------
// update
// ----------------------------------
{
displayName:'Id',
name:'id',
type:'string',
displayOptions:{
show:{
operation:[
'update',
],
},
},
default:'',
required: true,
description:'Id of the record to update.',
},
{
displayName:'Update All Fields',
name:'updateAllFields',
type:'boolean',
displayOptions:{
show:{
operation:[
'update',
],
},
},
default:true,
description:'If all fields should be send to Airtable or only specific ones.',
},
{
displayName:'Fields',
name:'fields',
type:'string',
typeOptions:{
multipleValues: true,
multipleValueButtonText:'Add Field',
},
displayOptions:{
show:{
updateAllFields:[
false,
],
operation:[
'update',
],
},
},
default:'',
placeholder:'Name',
required: true,
description:'The name of fields of which the data should be send to Airtable.',
},
],
};
methods={
loadOptions:{
// Get all the available applications to display them to user so that he can