Add Notion node V2 (#2437)

*  Add versioning

*  Add credentials verification

*  Add folmula filtering

*  Add file support

*  Apply internal review

*  Improvements

*  Add page updated event to trigger

*  Use name instead of id when setting expression in select type

*  improvements

*  Improvements

*  Improvement to descriptions

*  Add filter to databasePage:getAll

*  Improvements

*  Add database:search operation

*  Add page:archive operation

*  Allow clearing fields date type

*  Allow setting single value in people type field

* asasas

* asasas

* aaaaa

*  Improvements

*  Fix merging issues

* 🐛 Fix filename

*  Minor fix

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Ricardo Espinoza
2021-12-29 17:23:22 -05:00
committed by GitHub
parent aab5f5ddab
commit 7a8425a152
15 changed files with 2434 additions and 722 deletions

View File

@@ -6,7 +6,7 @@ import {
blocks,
} from './Blocks';
export const blockOperations: INodeProperties[] = [
export const blockOperations = [
{
displayName: 'Operation',
name: 'operation',
@@ -20,28 +20,27 @@ export const blockOperations: INodeProperties[] = [
},
options: [
{
name: 'Append',
name: 'Append After',
value: 'append',
description: 'Append a block',
},
{
name: 'Get All',
name: 'Get Child Blocks',
value: 'getAll',
description: 'Get all children blocks',
},
],
default: 'append',
description: 'The operation to perform.',
},
];
] as INodeProperties[];
export const blockFields: INodeProperties[] = [
export const blockFields = [
/* -------------------------------------------------------------------------- */
/* block:append */
/* -------------------------------------------------------------------------- */
{
displayName: 'Block ID',
displayName: 'Block ID or Link',
name: 'blockId',
type: 'string',
default: '',
@@ -56,14 +55,14 @@ export const blockFields: INodeProperties[] = [
],
},
},
description: `The ID of block. A page it is also considered a block. Hence, a Page ID can be used as well.`,
description: `The Block URL from Notion's 'copy link' functionality (or just the ID contained within the URL). Pages are also blocks, so you can use a page URL/ID here too`,
},
...blocks('block', 'append'),
/* -------------------------------------------------------------------------- */
/* block:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Block ID',
displayName: 'Block ID or Link',
name: 'blockId',
type: 'string',
default: '',
@@ -78,6 +77,7 @@ export const blockFields: INodeProperties[] = [
],
},
},
description: `The Block URL from Notion's 'copy link' functionality (or just the ID contained within the URL). Pages are also blocks, so you can use a page URL/ID here too`,
},
{
displayName: 'Return All',
@@ -94,7 +94,7 @@ export const blockFields: INodeProperties[] = [
},
},
default: false,
description: 'If all results should be returned or only up to a given limit.',
description: 'If all results should be returned or only up to a given limit',
},
{
displayName: 'Limit',
@@ -118,6 +118,6 @@ export const blockFields: INodeProperties[] = [
maxValue: 100,
},
default: 50,
description: 'How many results to return.',
description: 'How many results to return',
},
];
] as INodeProperties[];