mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
fix(Notion Node): Version fix (#6531)
This commit is contained in:
parent
b06462f441
commit
38dc784d2e
|
@ -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'],
|
||||
},
|
||||
|
|
|
@ -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: {},
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
},
|
||||
|
|
|
@ -73,12 +73,6 @@ export const versionDescription: INodeTypeDescription = {
|
|||
type: 'notice',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Version',
|
||||
name: 'version',
|
||||
type: 'hidden',
|
||||
default: 1,
|
||||
},
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,12 +73,6 @@ export const versionDescription: INodeTypeDescription = {
|
|||
type: 'notice',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Version',
|
||||
name: 'version',
|
||||
type: 'hidden',
|
||||
default: 2,
|
||||
},
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
|
|
Loading…
Reference in a new issue