mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -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,
|
noDataExpression: true,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['database'],
|
resource: ['database'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -41,7 +41,7 @@ export const databaseOperations: INodeProperties[] = [
|
||||||
noDataExpression: true,
|
noDataExpression: true,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [1],
|
'@version': [1],
|
||||||
resource: ['database'],
|
resource: ['database'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -178,7 +178,7 @@ export const databaseFields: INodeProperties[] = [
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['database'],
|
resource: ['database'],
|
||||||
operation: ['getAll', 'get'],
|
operation: ['getAll', 'get'],
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const databasePageOperations: INodeProperties[] = [
|
||||||
noDataExpression: true,
|
noDataExpression: true,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['databasePage'],
|
resource: ['databasePage'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -53,7 +53,7 @@ export const databasePageOperations: INodeProperties[] = [
|
||||||
noDataExpression: true,
|
noDataExpression: true,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [1],
|
'@version': [1],
|
||||||
resource: ['databasePage'],
|
resource: ['databasePage'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -161,7 +161,7 @@ export const databasePageFields: INodeProperties[] = [
|
||||||
default: '',
|
default: '',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['databasePage'],
|
resource: ['databasePage'],
|
||||||
operation: ['create'],
|
operation: ['create'],
|
||||||
},
|
},
|
||||||
|
@ -502,7 +502,7 @@ export const databasePageFields: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/version': [2],
|
'@version': [2],
|
||||||
type: ['files'],
|
type: ['files'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -969,7 +969,7 @@ export const databasePageFields: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/version': [2],
|
'@version': [2],
|
||||||
type: ['files'],
|
type: ['files'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1055,7 +1055,7 @@ export const databasePageFields: INodeProperties[] = [
|
||||||
],
|
],
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['databasePage'],
|
resource: ['databasePage'],
|
||||||
operation: ['get'],
|
operation: ['get'],
|
||||||
},
|
},
|
||||||
|
@ -1068,7 +1068,7 @@ export const databasePageFields: INodeProperties[] = [
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['databasePage'],
|
resource: ['databasePage'],
|
||||||
operation: ['get'],
|
operation: ['get'],
|
||||||
},
|
},
|
||||||
|
@ -1212,7 +1212,7 @@ export const databasePageFields: INodeProperties[] = [
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/version': [2],
|
'@version': [2],
|
||||||
'/resource': ['databasePage'],
|
'/resource': ['databasePage'],
|
||||||
'/operation': ['getAll'],
|
'/operation': ['getAll'],
|
||||||
},
|
},
|
||||||
|
@ -1230,7 +1230,7 @@ export const databasePageFields: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/version': [1],
|
'@version': [1],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: {},
|
default: {},
|
||||||
|
|
|
@ -880,7 +880,7 @@ export function getSearchFilters(resource: string) {
|
||||||
],
|
],
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: [resource],
|
resource: [resource],
|
||||||
operation: ['getAll'],
|
operation: ['getAll'],
|
||||||
},
|
},
|
||||||
|
@ -903,7 +903,7 @@ export function getSearchFilters(resource: string) {
|
||||||
],
|
],
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: [resource],
|
resource: [resource],
|
||||||
operation: ['getAll'],
|
operation: ['getAll'],
|
||||||
filterType: ['manual'],
|
filterType: ['manual'],
|
||||||
|
@ -920,7 +920,7 @@ export function getSearchFilters(resource: string) {
|
||||||
},
|
},
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: [resource],
|
resource: [resource],
|
||||||
operation: ['getAll'],
|
operation: ['getAll'],
|
||||||
filterType: ['manual'],
|
filterType: ['manual'],
|
||||||
|
@ -943,7 +943,7 @@ export function getSearchFilters(resource: string) {
|
||||||
type: 'notice',
|
type: 'notice',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: [resource],
|
resource: [resource],
|
||||||
operation: ['getAll'],
|
operation: ['getAll'],
|
||||||
filterType: ['json'],
|
filterType: ['json'],
|
||||||
|
@ -957,7 +957,7 @@ export function getSearchFilters(resource: string) {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: [resource],
|
resource: [resource],
|
||||||
operation: ['getAll'],
|
operation: ['getAll'],
|
||||||
filterType: ['json'],
|
filterType: ['json'],
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const pageOperations: INodeProperties[] = [
|
||||||
noDataExpression: true,
|
noDataExpression: true,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [1],
|
'@version': [1],
|
||||||
resource: ['page'],
|
resource: ['page'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -43,7 +43,7 @@ export const pageOperations: INodeProperties[] = [
|
||||||
noDataExpression: true,
|
noDataExpression: true,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['page'],
|
resource: ['page'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -127,7 +127,7 @@ export const pageFields: INodeProperties[] = [
|
||||||
],
|
],
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['page'],
|
resource: ['page'],
|
||||||
operation: ['archive'],
|
operation: ['archive'],
|
||||||
},
|
},
|
||||||
|
@ -140,7 +140,7 @@ export const pageFields: INodeProperties[] = [
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [2],
|
'@version': [2],
|
||||||
resource: ['page'],
|
resource: ['page'],
|
||||||
operation: ['archive'],
|
operation: ['archive'],
|
||||||
},
|
},
|
||||||
|
@ -289,7 +289,7 @@ export const pageFields: INodeProperties[] = [
|
||||||
required: true,
|
required: true,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [1],
|
'@version': [1],
|
||||||
resource: ['page'],
|
resource: ['page'],
|
||||||
operation: ['get'],
|
operation: ['get'],
|
||||||
},
|
},
|
||||||
|
@ -303,7 +303,7 @@ export const pageFields: INodeProperties[] = [
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
version: [1],
|
'@version': [1],
|
||||||
resource: ['page'],
|
resource: ['page'],
|
||||||
operation: ['get'],
|
operation: ['get'],
|
||||||
},
|
},
|
||||||
|
|
|
@ -73,12 +73,6 @@ export const versionDescription: INodeTypeDescription = {
|
||||||
type: 'notice',
|
type: 'notice',
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
displayName: 'Version',
|
|
||||||
name: 'version',
|
|
||||||
type: 'hidden',
|
|
||||||
default: 1,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
displayName: 'Resource',
|
displayName: 'Resource',
|
||||||
name: '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);
|
return this.prepareOutputData(returnData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,12 +73,6 @@ export const versionDescription: INodeTypeDescription = {
|
||||||
type: 'notice',
|
type: 'notice',
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
displayName: 'Version',
|
|
||||||
name: 'version',
|
|
||||||
type: 'hidden',
|
|
||||||
default: 2,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
displayName: 'Resource',
|
displayName: 'Resource',
|
||||||
name: 'resource',
|
name: 'resource',
|
||||||
|
|
Loading…
Reference in a new issue