fix(Notion Node): Version fix (#6531)

This commit is contained in:
Michael Kret 2023-06-23 14:21:08 +03:00 committed by GitHub
parent b06462f441
commit 38dc784d2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 40 deletions

View file

@ -8,7 +8,7 @@ export const databaseOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['database'],
},
},
@ -41,7 +41,7 @@ export const databaseOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['database'],
},
},
@ -178,7 +178,7 @@ export const databaseFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['database'],
operation: ['getAll', 'get'],
},

View file

@ -14,7 +14,7 @@ export const databasePageOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['databasePage'],
},
},
@ -53,7 +53,7 @@ export const databasePageOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['databasePage'],
},
},
@ -161,7 +161,7 @@ export const databasePageFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['databasePage'],
operation: ['create'],
},
@ -502,7 +502,7 @@ export const databasePageFields: INodeProperties[] = [
},
displayOptions: {
show: {
'/version': [2],
'@version': [2],
type: ['files'],
},
},
@ -969,7 +969,7 @@ export const databasePageFields: INodeProperties[] = [
},
displayOptions: {
show: {
'/version': [2],
'@version': [2],
type: ['files'],
},
},
@ -1055,7 +1055,7 @@ export const databasePageFields: INodeProperties[] = [
],
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['databasePage'],
operation: ['get'],
},
@ -1068,7 +1068,7 @@ export const databasePageFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['databasePage'],
operation: ['get'],
},
@ -1212,7 +1212,7 @@ export const databasePageFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
'/version': [2],
'@version': [2],
'/resource': ['databasePage'],
'/operation': ['getAll'],
},
@ -1230,7 +1230,7 @@ export const databasePageFields: INodeProperties[] = [
},
displayOptions: {
show: {
'/version': [1],
'@version': [1],
},
},
default: {},

View file

@ -880,7 +880,7 @@ export function getSearchFilters(resource: string) {
],
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
},
@ -903,7 +903,7 @@ export function getSearchFilters(resource: string) {
],
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
filterType: ['manual'],
@ -920,7 +920,7 @@ export function getSearchFilters(resource: string) {
},
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
filterType: ['manual'],
@ -943,7 +943,7 @@ export function getSearchFilters(resource: string) {
type: 'notice',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
filterType: ['json'],
@ -957,7 +957,7 @@ export function getSearchFilters(resource: string) {
type: 'string',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
filterType: ['json'],

View file

@ -10,7 +10,7 @@ export const pageOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['page'],
},
},
@ -43,7 +43,7 @@ export const pageOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['page'],
},
},
@ -127,7 +127,7 @@ export const pageFields: INodeProperties[] = [
],
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['page'],
operation: ['archive'],
},
@ -140,7 +140,7 @@ export const pageFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['page'],
operation: ['archive'],
},
@ -289,7 +289,7 @@ export const pageFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['page'],
operation: ['get'],
},
@ -303,7 +303,7 @@ export const pageFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['page'],
operation: ['get'],
},

View file

@ -73,12 +73,6 @@ export const versionDescription: INodeTypeDescription = {
type: 'notice',
default: '',
},
{
displayName: 'Version',
name: 'version',
type: 'hidden',
default: 1,
},
{
displayName: 'Resource',
name: 'resource',

View file

@ -758,11 +758,6 @@ export class NotionV2 implements INodeType {
}
}
if (download) {
const rawData = returnData.map((data) => data.json);
return this.prepareOutputData(rawData as INodeExecutionData[]);
}
return this.prepareOutputData(returnData);
}
}

View file

@ -73,12 +73,6 @@ export const versionDescription: INodeTypeDescription = {
type: 'notice',
default: '',
},
{
displayName: 'Version',
name: 'version',
type: 'hidden',
default: 2,
},
{
displayName: 'Resource',
name: 'resource',