Skip to content

Commit da7631a

Browse files
authored
Merge pull request #12 from splch/fix/postreceive-wrapper-keys
fix: unwrap single-item responses with correct wrapper keys
2 parents fe49598 + 254caaf commit da7631a

9 files changed

Lines changed: 20 additions & 20 deletions

File tree

nodes/Anytype/resources/members/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const membersDescription: INodeProperties[] = [
4949
url: '=/spaces/{{$parameter.spaceId}}/members/{{$parameter.memberId}}',
5050
},
5151
output: {
52-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
52+
postReceive: [{ type: 'rootProperty', properties: { property: 'member' } }],
5353
},
5454
},
5555
},

nodes/Anytype/resources/objects/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const objectsDescription: INodeProperties[] = [
4040
body: '={{$parameter.body}}',
4141
},
4242
output: {
43-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
43+
postReceive: [{ type: 'rootProperty', properties: { property: 'object' } }],
4444
},
4545
},
4646
},
@@ -67,7 +67,7 @@ export const objectsDescription: INodeProperties[] = [
6767
url: '=/spaces/{{$parameter.spaceId}}/objects/{{$parameter.objectId}}',
6868
},
6969
output: {
70-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
70+
postReceive: [{ type: 'rootProperty', properties: { property: 'object' } }],
7171
},
7272
},
7373
},
@@ -98,7 +98,7 @@ export const objectsDescription: INodeProperties[] = [
9898
body: '={{$parameter.body}}',
9999
},
100100
output: {
101-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
101+
postReceive: [{ type: 'rootProperty', properties: { property: 'object' } }],
102102
},
103103
},
104104
},

nodes/Anytype/resources/properties/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const propertiesDescription: INodeProperties[] = [
4040
body: '={{$parameter.body}}',
4141
},
4242
output: {
43-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
43+
postReceive: [{ type: 'rootProperty', properties: { property: 'property' } }],
4444
},
4545
},
4646
},
@@ -67,7 +67,7 @@ export const propertiesDescription: INodeProperties[] = [
6767
url: '=/spaces/{{$parameter.spaceId}}/properties/{{$parameter.propertyId}}',
6868
},
6969
output: {
70-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
70+
postReceive: [{ type: 'rootProperty', properties: { property: 'property' } }],
7171
},
7272
},
7373
},
@@ -98,7 +98,7 @@ export const propertiesDescription: INodeProperties[] = [
9898
body: '={{$parameter.body}}',
9999
},
100100
output: {
101-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
101+
postReceive: [{ type: 'rootProperty', properties: { property: 'property' } }],
102102
},
103103
},
104104
},

nodes/Anytype/resources/spaces/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const spacesDescription: INodeProperties[] = [
5757
body: '={{$parameter.body}}',
5858
},
5959
output: {
60-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
60+
postReceive: [{ type: 'rootProperty', properties: { property: 'space' } }],
6161
},
6262
},
6363
},
@@ -72,7 +72,7 @@ export const spacesDescription: INodeProperties[] = [
7272
url: '=/spaces/{{$parameter.spaceId}}',
7373
},
7474
output: {
75-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
75+
postReceive: [{ type: 'rootProperty', properties: { property: 'space' } }],
7676
},
7777
},
7878
},
@@ -88,7 +88,7 @@ export const spacesDescription: INodeProperties[] = [
8888
body: '={{$parameter.body}}',
8989
},
9090
output: {
91-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
91+
postReceive: [{ type: 'rootProperty', properties: { property: 'space' } }],
9292
},
9393
},
9494
},

nodes/Anytype/resources/tags/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const tagsDescription: INodeProperties[] = [
4040
body: '={{$parameter.body}}',
4141
},
4242
output: {
43-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
43+
postReceive: [{ type: 'rootProperty', properties: { property: 'tag' } }],
4444
},
4545
},
4646
},
@@ -67,7 +67,7 @@ export const tagsDescription: INodeProperties[] = [
6767
url: '=/spaces/{{$parameter.spaceId}}/properties/{{$parameter.propertyId}}/tags/{{$parameter.tagId}}',
6868
},
6969
output: {
70-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
70+
postReceive: [{ type: 'rootProperty', properties: { property: 'tag' } }],
7171
},
7272
},
7373
},
@@ -98,7 +98,7 @@ export const tagsDescription: INodeProperties[] = [
9898
body: '={{$parameter.body}}',
9999
},
100100
output: {
101-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
101+
postReceive: [{ type: 'rootProperty', properties: { property: 'tag' } }],
102102
},
103103
},
104104
},

nodes/Anytype/resources/templates/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const templatesDescription: INodeProperties[] = [
5454
url: '=/spaces/{{$parameter.spaceId}}/types/{{$parameter.typeId}}/templates/{{$parameter.templateId}}',
5555
},
5656
output: {
57-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
57+
postReceive: [{ type: 'rootProperty', properties: { property: 'template' } }],
5858
},
5959
},
6060
},

nodes/Anytype/resources/types/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const typesDescription: INodeProperties[] = [
4040
body: '={{$parameter.body}}',
4141
},
4242
output: {
43-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
43+
postReceive: [{ type: 'rootProperty', properties: { property: 'type' } }],
4444
},
4545
},
4646
},
@@ -67,7 +67,7 @@ export const typesDescription: INodeProperties[] = [
6767
url: '=/spaces/{{$parameter.spaceId}}/types/{{$parameter.typeId}}',
6868
},
6969
output: {
70-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
70+
postReceive: [{ type: 'rootProperty', properties: { property: 'type' } }],
7171
},
7272
},
7373
},
@@ -98,7 +98,7 @@ export const typesDescription: INodeProperties[] = [
9898
body: '={{$parameter.body}}',
9999
},
100100
output: {
101-
postReceive: [{ type: 'rootProperty', properties: { property: 'data' } }],
101+
postReceive: [{ type: 'rootProperty', properties: { property: 'type' } }],
102102
},
103103
},
104104
},

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "n8n-nodes-anytype",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "n8n community node for the Anytype API",
55
"license": "MIT",
66
"homepage": "https://n8n.io/",

0 commit comments

Comments
 (0)