Skip to content

Commit

Permalink
fix(Notion Node): Version fix (#6531)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency authored and netroy committed Jun 27, 2023
1 parent 988c4a6 commit d3d8522
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 40 deletions.
6 changes: 3 additions & 3 deletions packages/nodes-base/nodes/Notion/DatabaseDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const databaseOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['database'],
},
},
Expand Down Expand Up @@ -41,7 +41,7 @@ export const databaseOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['database'],
},
},
Expand Down Expand Up @@ -178,7 +178,7 @@ export const databaseFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['database'],
operation: ['getAll', 'get'],
},
Expand Down
18 changes: 9 additions & 9 deletions packages/nodes-base/nodes/Notion/DatabasePageDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const databasePageOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['databasePage'],
},
},
Expand Down Expand Up @@ -53,7 +53,7 @@ export const databasePageOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['databasePage'],
},
},
Expand Down Expand Up @@ -161,7 +161,7 @@ export const databasePageFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['databasePage'],
operation: ['create'],
},
Expand Down Expand Up @@ -502,7 +502,7 @@ export const databasePageFields: INodeProperties[] = [
},
displayOptions: {
show: {
'/version': [2],
'@version': [2],
type: ['files'],
},
},
Expand Down Expand Up @@ -969,7 +969,7 @@ export const databasePageFields: INodeProperties[] = [
},
displayOptions: {
show: {
'/version': [2],
'@version': [2],
type: ['files'],
},
},
Expand Down Expand Up @@ -1055,7 +1055,7 @@ export const databasePageFields: INodeProperties[] = [
],
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['databasePage'],
operation: ['get'],
},
Expand All @@ -1068,7 +1068,7 @@ export const databasePageFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['databasePage'],
operation: ['get'],
},
Expand Down Expand Up @@ -1212,7 +1212,7 @@ export const databasePageFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
'/version': [2],
'@version': [2],
'/resource': ['databasePage'],
'/operation': ['getAll'],
},
Expand All @@ -1230,7 +1230,7 @@ export const databasePageFields: INodeProperties[] = [
},
displayOptions: {
show: {
'/version': [1],
'@version': [1],
},
},
default: {},
Expand Down
10 changes: 5 additions & 5 deletions packages/nodes-base/nodes/Notion/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ export function getSearchFilters(resource: string) {
],
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
},
Expand All @@ -903,7 +903,7 @@ export function getSearchFilters(resource: string) {
],
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
filterType: ['manual'],
Expand All @@ -920,7 +920,7 @@ export function getSearchFilters(resource: string) {
},
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
filterType: ['manual'],
Expand All @@ -943,7 +943,7 @@ export function getSearchFilters(resource: string) {
type: 'notice',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
filterType: ['json'],
Expand All @@ -957,7 +957,7 @@ export function getSearchFilters(resource: string) {
type: 'string',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: [resource],
operation: ['getAll'],
filterType: ['json'],
Expand Down
12 changes: 6 additions & 6 deletions packages/nodes-base/nodes/Notion/PageDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const pageOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['page'],
},
},
Expand Down Expand Up @@ -43,7 +43,7 @@ export const pageOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['page'],
},
},
Expand Down Expand Up @@ -127,7 +127,7 @@ export const pageFields: INodeProperties[] = [
],
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['page'],
operation: ['archive'],
},
Expand All @@ -140,7 +140,7 @@ export const pageFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
version: [2],
'@version': [2],
resource: ['page'],
operation: ['archive'],
},
Expand Down Expand Up @@ -289,7 +289,7 @@ export const pageFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['page'],
operation: ['get'],
},
Expand All @@ -303,7 +303,7 @@ export const pageFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
version: [1],
'@version': [1],
resource: ['page'],
operation: ['get'],
},
Expand Down
6 changes: 0 additions & 6 deletions packages/nodes-base/nodes/Notion/v1/VersionDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ export const versionDescription: INodeTypeDescription = {
type: 'notice',
default: '',
},
{
displayName: 'Version',
name: 'version',
type: 'hidden',
default: 1,
},
{
displayName: 'Resource',
name: 'resource',
Expand Down
5 changes: 0 additions & 5 deletions packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
6 changes: 0 additions & 6 deletions packages/nodes-base/nodes/Notion/v2/VersionDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ export const versionDescription: INodeTypeDescription = {
type: 'notice',
default: '',
},
{
displayName: 'Version',
name: 'version',
type: 'hidden',
default: 2,
},
{
displayName: 'Resource',
name: 'resource',
Expand Down

0 comments on commit d3d8522

Please sign in to comment.