n8n-nodes-pb 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/credentials/PocketBaseApi.credentials.js +8 -8
- package/dist/icons/pocketbase.png +0 -0
- package/dist/nodes/PocketBase/PocketBase.node.js +16 -16
- package/dist/nodes/PocketBase/descriptions/CollectionDescription.js +9 -9
- package/dist/nodes/PocketBase/descriptions/FileDescription.js +17 -17
- package/dist/nodes/PocketBase/descriptions/RecordDescription.js +47 -47
- package/package.json +1 -1
|
@@ -8,40 +8,40 @@ class PocketBaseApi {
|
|
|
8
8
|
this.documentationUrl = 'https://pocketbase.io/docs';
|
|
9
9
|
this.properties = [
|
|
10
10
|
{
|
|
11
|
-
displayName: 'PocketBase
|
|
11
|
+
displayName: 'PocketBase 地址',
|
|
12
12
|
name: 'url',
|
|
13
13
|
type: 'string',
|
|
14
14
|
default: 'http://127.0.0.1:8090',
|
|
15
15
|
placeholder: 'https://your-pocketbase.com',
|
|
16
|
-
description: '
|
|
16
|
+
description: 'PocketBase 服务器的 URL 地址',
|
|
17
17
|
required: true,
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
|
-
displayName: '
|
|
20
|
+
displayName: '邮箱',
|
|
21
21
|
name: 'email',
|
|
22
22
|
type: 'string',
|
|
23
23
|
default: '',
|
|
24
24
|
placeholder: 'admin@example.com',
|
|
25
|
-
description: '
|
|
25
|
+
description: '管理员或用户邮箱',
|
|
26
26
|
required: true,
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
displayName: '
|
|
29
|
+
displayName: '密码',
|
|
30
30
|
name: 'password',
|
|
31
31
|
type: 'string',
|
|
32
32
|
typeOptions: {
|
|
33
33
|
password: true,
|
|
34
34
|
},
|
|
35
35
|
default: '',
|
|
36
|
-
description: '
|
|
36
|
+
description: '账户密码',
|
|
37
37
|
required: true,
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
displayName: '
|
|
40
|
+
displayName: '认证集合',
|
|
41
41
|
name: 'authCollection',
|
|
42
42
|
type: 'string',
|
|
43
43
|
default: '_superusers',
|
|
44
|
-
description: '
|
|
44
|
+
description: '用于认证的集合名称(如 _superusers, users)',
|
|
45
45
|
},
|
|
46
46
|
];
|
|
47
47
|
this.authenticate = {
|
|
Binary file
|
|
@@ -8,13 +8,13 @@ const FileDescription_1 = require("./descriptions/FileDescription");
|
|
|
8
8
|
class PocketBase {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.description = {
|
|
11
|
-
displayName: 'PocketBase',
|
|
11
|
+
displayName: 'PocketBase 数据库',
|
|
12
12
|
name: 'pocketBase',
|
|
13
|
-
icon: 'file:pocketbase.
|
|
13
|
+
icon: 'file:pocketbase.png',
|
|
14
14
|
group: ['transform'],
|
|
15
15
|
version: 1,
|
|
16
16
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
17
|
-
description: '
|
|
17
|
+
description: '与 PocketBase 数据库进行交互',
|
|
18
18
|
defaults: {
|
|
19
19
|
name: 'PocketBase',
|
|
20
20
|
},
|
|
@@ -28,36 +28,36 @@ class PocketBase {
|
|
|
28
28
|
],
|
|
29
29
|
properties: [
|
|
30
30
|
{
|
|
31
|
-
displayName: '
|
|
31
|
+
displayName: '资源',
|
|
32
32
|
name: 'resource',
|
|
33
33
|
type: 'options',
|
|
34
34
|
noDataExpression: true,
|
|
35
35
|
options: [
|
|
36
36
|
{
|
|
37
|
-
name: '
|
|
37
|
+
name: '📄 记录',
|
|
38
38
|
value: 'record',
|
|
39
|
-
description: '
|
|
39
|
+
description: '操作数据库中的记录',
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
name: '
|
|
42
|
+
name: '📁 集合',
|
|
43
43
|
value: 'collection',
|
|
44
|
-
description: '
|
|
44
|
+
description: '管理数据集合',
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
name: '
|
|
47
|
+
name: '📎 文件',
|
|
48
48
|
value: 'file',
|
|
49
|
-
description: '
|
|
49
|
+
description: '管理文件和附件',
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
name: '
|
|
52
|
+
name: '💚 健康检查',
|
|
53
53
|
value: 'health',
|
|
54
|
-
description: '
|
|
54
|
+
description: '检查服务器状态',
|
|
55
55
|
},
|
|
56
56
|
],
|
|
57
57
|
default: 'record',
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
displayName: '
|
|
60
|
+
displayName: '操作',
|
|
61
61
|
name: 'operation',
|
|
62
62
|
type: 'options',
|
|
63
63
|
noDataExpression: true,
|
|
@@ -68,10 +68,10 @@ class PocketBase {
|
|
|
68
68
|
},
|
|
69
69
|
options: [
|
|
70
70
|
{
|
|
71
|
-
name: '
|
|
71
|
+
name: '检查状态',
|
|
72
72
|
value: 'check',
|
|
73
|
-
description: '
|
|
74
|
-
action: '
|
|
73
|
+
description: '检查服务器健康状态',
|
|
74
|
+
action: '检查服务器状态',
|
|
75
75
|
},
|
|
76
76
|
],
|
|
77
77
|
default: 'check',
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.collectionFields = exports.collectionOperations = void 0;
|
|
4
4
|
exports.collectionOperations = [
|
|
5
5
|
{
|
|
6
|
-
displayName: '
|
|
6
|
+
displayName: '操作',
|
|
7
7
|
name: 'operation',
|
|
8
8
|
type: 'options',
|
|
9
9
|
noDataExpression: true,
|
|
@@ -14,16 +14,16 @@ exports.collectionOperations = [
|
|
|
14
14
|
},
|
|
15
15
|
options: [
|
|
16
16
|
{
|
|
17
|
-
name: '
|
|
17
|
+
name: '📋 获取所有集合',
|
|
18
18
|
value: 'getMany',
|
|
19
|
-
description: '
|
|
20
|
-
action: '
|
|
19
|
+
description: '获取所有数据集合',
|
|
20
|
+
action: '获取所有集合',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
name: '
|
|
23
|
+
name: '🔍 获取集合详情',
|
|
24
24
|
value: 'get',
|
|
25
|
-
description: '
|
|
26
|
-
action: '
|
|
25
|
+
description: '通过 ID 或名称获取集合详情',
|
|
26
|
+
action: '获取集合详情',
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
29
|
default: 'getMany',
|
|
@@ -31,13 +31,13 @@ exports.collectionOperations = [
|
|
|
31
31
|
];
|
|
32
32
|
exports.collectionFields = [
|
|
33
33
|
{
|
|
34
|
-
displayName: '
|
|
34
|
+
displayName: '集合 ID 或名称',
|
|
35
35
|
name: 'collectionId',
|
|
36
36
|
type: 'string',
|
|
37
37
|
required: true,
|
|
38
38
|
default: '',
|
|
39
39
|
placeholder: 'notes',
|
|
40
|
-
description: 'ID
|
|
40
|
+
description: '集合的 ID 或名称',
|
|
41
41
|
displayOptions: {
|
|
42
42
|
show: {
|
|
43
43
|
resource: ['collection'],
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fileFields = exports.fileOperations = void 0;
|
|
4
4
|
exports.fileOperations = [
|
|
5
5
|
{
|
|
6
|
-
displayName: '
|
|
6
|
+
displayName: '操作',
|
|
7
7
|
name: 'operation',
|
|
8
8
|
type: 'options',
|
|
9
9
|
noDataExpression: true,
|
|
@@ -14,16 +14,16 @@ exports.fileOperations = [
|
|
|
14
14
|
},
|
|
15
15
|
options: [
|
|
16
16
|
{
|
|
17
|
-
name: '
|
|
17
|
+
name: '🔗 获取文件链接',
|
|
18
18
|
value: 'getUrl',
|
|
19
|
-
description: '
|
|
20
|
-
action: '
|
|
19
|
+
description: '获取文件的下载链接',
|
|
20
|
+
action: '获取文件链接',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
name: '
|
|
23
|
+
name: '🔑 获取访问令牌',
|
|
24
24
|
value: 'getToken',
|
|
25
|
-
description: '
|
|
26
|
-
action: '
|
|
25
|
+
description: '获取受保护文件的访问令牌',
|
|
26
|
+
action: '获取文件访问令牌',
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
29
|
default: 'getUrl',
|
|
@@ -31,13 +31,13 @@ exports.fileOperations = [
|
|
|
31
31
|
];
|
|
32
32
|
exports.fileFields = [
|
|
33
33
|
{
|
|
34
|
-
displayName: '
|
|
34
|
+
displayName: '集合名称',
|
|
35
35
|
name: 'collection',
|
|
36
36
|
type: 'string',
|
|
37
37
|
required: true,
|
|
38
38
|
default: '',
|
|
39
39
|
placeholder: 'notes',
|
|
40
|
-
description: '
|
|
40
|
+
description: '文件所属的集合名称',
|
|
41
41
|
displayOptions: {
|
|
42
42
|
show: {
|
|
43
43
|
resource: ['file'],
|
|
@@ -46,13 +46,13 @@ exports.fileFields = [
|
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
displayName: '
|
|
49
|
+
displayName: '记录 ID',
|
|
50
50
|
name: 'recordId',
|
|
51
51
|
type: 'string',
|
|
52
52
|
required: true,
|
|
53
53
|
default: '',
|
|
54
54
|
placeholder: 'abc123xyz',
|
|
55
|
-
description: 'ID
|
|
55
|
+
description: '文件所属的记录 ID',
|
|
56
56
|
displayOptions: {
|
|
57
57
|
show: {
|
|
58
58
|
resource: ['file'],
|
|
@@ -61,13 +61,13 @@ exports.fileFields = [
|
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
displayName: '
|
|
64
|
+
displayName: '文件名',
|
|
65
65
|
name: 'filename',
|
|
66
66
|
type: 'string',
|
|
67
67
|
required: true,
|
|
68
68
|
default: '',
|
|
69
69
|
placeholder: 'image.jpg',
|
|
70
|
-
description: '
|
|
70
|
+
description: '文件的名称',
|
|
71
71
|
displayOptions: {
|
|
72
72
|
show: {
|
|
73
73
|
resource: ['file'],
|
|
@@ -76,10 +76,10 @@ exports.fileFields = [
|
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
|
-
displayName: '
|
|
79
|
+
displayName: '高级选项',
|
|
80
80
|
name: 'options',
|
|
81
81
|
type: 'collection',
|
|
82
|
-
placeholder: '
|
|
82
|
+
placeholder: '添加选项',
|
|
83
83
|
default: {},
|
|
84
84
|
displayOptions: {
|
|
85
85
|
show: {
|
|
@@ -89,12 +89,12 @@ exports.fileFields = [
|
|
|
89
89
|
},
|
|
90
90
|
options: [
|
|
91
91
|
{
|
|
92
|
-
displayName: '
|
|
92
|
+
displayName: '缩略图尺寸',
|
|
93
93
|
name: 'thumb',
|
|
94
94
|
type: 'string',
|
|
95
95
|
default: '',
|
|
96
96
|
placeholder: '100x100',
|
|
97
|
-
description: '
|
|
97
|
+
description: '缩略图尺寸(如 100x100, 0x300)',
|
|
98
98
|
},
|
|
99
99
|
],
|
|
100
100
|
},
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.recordFields = exports.recordOperations = void 0;
|
|
4
4
|
exports.recordOperations = [
|
|
5
5
|
{
|
|
6
|
-
displayName: '
|
|
6
|
+
displayName: '操作',
|
|
7
7
|
name: 'operation',
|
|
8
8
|
type: 'options',
|
|
9
9
|
noDataExpression: true,
|
|
@@ -14,34 +14,34 @@ exports.recordOperations = [
|
|
|
14
14
|
},
|
|
15
15
|
options: [
|
|
16
16
|
{
|
|
17
|
-
name: '
|
|
17
|
+
name: '➕ 创建记录',
|
|
18
18
|
value: 'create',
|
|
19
|
-
description: '
|
|
20
|
-
action: '
|
|
19
|
+
description: '创建一条新记录',
|
|
20
|
+
action: '创建一条记录',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
name: '
|
|
23
|
+
name: '🗑️ 删除记录',
|
|
24
24
|
value: 'delete',
|
|
25
|
-
description: '
|
|
26
|
-
action: '
|
|
25
|
+
description: '删除一条记录',
|
|
26
|
+
action: '删除一条记录',
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
name: '
|
|
29
|
+
name: '🔍 获取单条记录',
|
|
30
30
|
value: 'get',
|
|
31
|
-
description: '
|
|
32
|
-
action: '
|
|
31
|
+
description: '通过 ID 获取一条记录',
|
|
32
|
+
action: '获取一条记录',
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
name: '
|
|
35
|
+
name: '📋 获取多条记录',
|
|
36
36
|
value: 'getMany',
|
|
37
|
-
description: '
|
|
38
|
-
action: '
|
|
37
|
+
description: '获取多条记录(支持筛选)',
|
|
38
|
+
action: '获取多条记录',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
name: '
|
|
41
|
+
name: '✏️ 更新记录',
|
|
42
42
|
value: 'update',
|
|
43
|
-
description: '
|
|
44
|
-
action: '
|
|
43
|
+
description: '更新一条记录',
|
|
44
|
+
action: '更新一条记录',
|
|
45
45
|
},
|
|
46
46
|
],
|
|
47
47
|
default: 'getMany',
|
|
@@ -49,13 +49,13 @@ exports.recordOperations = [
|
|
|
49
49
|
];
|
|
50
50
|
exports.recordFields = [
|
|
51
51
|
{
|
|
52
|
-
displayName: '
|
|
52
|
+
displayName: '集合名称',
|
|
53
53
|
name: 'collection',
|
|
54
54
|
type: 'string',
|
|
55
55
|
required: true,
|
|
56
56
|
default: '',
|
|
57
57
|
placeholder: 'notes',
|
|
58
|
-
description: '
|
|
58
|
+
description: '要操作的数据集合名称',
|
|
59
59
|
displayOptions: {
|
|
60
60
|
show: {
|
|
61
61
|
resource: ['record'],
|
|
@@ -63,13 +63,13 @@ exports.recordFields = [
|
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
|
-
displayName: '
|
|
66
|
+
displayName: '记录 ID',
|
|
67
67
|
name: 'recordId',
|
|
68
68
|
type: 'string',
|
|
69
69
|
required: true,
|
|
70
70
|
default: '',
|
|
71
71
|
placeholder: 'abc123xyz',
|
|
72
|
-
description: '
|
|
72
|
+
description: '记录的唯一标识符',
|
|
73
73
|
displayOptions: {
|
|
74
74
|
show: {
|
|
75
75
|
resource: ['record'],
|
|
@@ -78,15 +78,15 @@ exports.recordFields = [
|
|
|
78
78
|
},
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
|
-
displayName: '
|
|
81
|
+
displayName: '字段列表',
|
|
82
82
|
name: 'fields',
|
|
83
83
|
type: 'fixedCollection',
|
|
84
84
|
typeOptions: {
|
|
85
85
|
multipleValues: true,
|
|
86
86
|
},
|
|
87
87
|
default: {},
|
|
88
|
-
placeholder: '
|
|
89
|
-
description: '
|
|
88
|
+
placeholder: '添加字段',
|
|
89
|
+
description: '要设置的字段',
|
|
90
90
|
displayOptions: {
|
|
91
91
|
show: {
|
|
92
92
|
resource: ['record'],
|
|
@@ -96,34 +96,34 @@ exports.recordFields = [
|
|
|
96
96
|
options: [
|
|
97
97
|
{
|
|
98
98
|
name: 'field',
|
|
99
|
-
displayName: '
|
|
99
|
+
displayName: '字段',
|
|
100
100
|
values: [
|
|
101
101
|
{
|
|
102
|
-
displayName: '
|
|
102
|
+
displayName: '字段名',
|
|
103
103
|
name: 'name',
|
|
104
104
|
type: 'string',
|
|
105
105
|
default: '',
|
|
106
106
|
placeholder: 'title',
|
|
107
|
-
description: '
|
|
107
|
+
description: '字段的名称',
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
displayName: '
|
|
110
|
+
displayName: '字段值',
|
|
111
111
|
name: 'value',
|
|
112
112
|
type: 'string',
|
|
113
113
|
default: '',
|
|
114
|
-
placeholder: '
|
|
115
|
-
description: '
|
|
114
|
+
placeholder: '我的标题',
|
|
115
|
+
description: '字段的值',
|
|
116
116
|
},
|
|
117
117
|
],
|
|
118
118
|
},
|
|
119
119
|
],
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
displayName: '
|
|
122
|
+
displayName: '返回全部',
|
|
123
123
|
name: 'returnAll',
|
|
124
124
|
type: 'boolean',
|
|
125
125
|
default: false,
|
|
126
|
-
description: '
|
|
126
|
+
description: '是否返回所有结果',
|
|
127
127
|
displayOptions: {
|
|
128
128
|
show: {
|
|
129
129
|
resource: ['record'],
|
|
@@ -132,7 +132,7 @@ exports.recordFields = [
|
|
|
132
132
|
},
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
|
-
displayName: '
|
|
135
|
+
displayName: '返回数量限制',
|
|
136
136
|
name: 'limit',
|
|
137
137
|
type: 'number',
|
|
138
138
|
default: 50,
|
|
@@ -140,7 +140,7 @@ exports.recordFields = [
|
|
|
140
140
|
minValue: 1,
|
|
141
141
|
maxValue: 500,
|
|
142
142
|
},
|
|
143
|
-
description: '
|
|
143
|
+
description: '最多返回的记录数量',
|
|
144
144
|
displayOptions: {
|
|
145
145
|
show: {
|
|
146
146
|
resource: ['record'],
|
|
@@ -150,10 +150,10 @@ exports.recordFields = [
|
|
|
150
150
|
},
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
|
-
displayName: '
|
|
153
|
+
displayName: '高级选项',
|
|
154
154
|
name: 'options',
|
|
155
155
|
type: 'collection',
|
|
156
|
-
placeholder: '
|
|
156
|
+
placeholder: '添加选项',
|
|
157
157
|
default: {},
|
|
158
158
|
displayOptions: {
|
|
159
159
|
show: {
|
|
@@ -163,44 +163,44 @@ exports.recordFields = [
|
|
|
163
163
|
},
|
|
164
164
|
options: [
|
|
165
165
|
{
|
|
166
|
-
displayName: '
|
|
166
|
+
displayName: '筛选条件',
|
|
167
167
|
name: 'filter',
|
|
168
168
|
type: 'string',
|
|
169
169
|
default: '',
|
|
170
170
|
placeholder: "status = 'active' && created > '2024-01-01'",
|
|
171
|
-
description: '
|
|
171
|
+
description: '过滤表达式',
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
|
-
displayName: '
|
|
174
|
+
displayName: '排序方式',
|
|
175
175
|
name: 'sort',
|
|
176
176
|
type: 'string',
|
|
177
177
|
default: '',
|
|
178
178
|
placeholder: '-created,title',
|
|
179
|
-
description: '
|
|
179
|
+
description: '排序字段(使用 - 表示降序)',
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
|
-
displayName: '
|
|
182
|
+
displayName: '展开关联',
|
|
183
183
|
name: 'expand',
|
|
184
184
|
type: 'string',
|
|
185
185
|
default: '',
|
|
186
186
|
placeholder: 'author,tags',
|
|
187
|
-
description: '
|
|
187
|
+
description: '要展开的关联字段(逗号分隔)',
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
|
-
displayName: '
|
|
190
|
+
displayName: '返回字段',
|
|
191
191
|
name: 'fields',
|
|
192
192
|
type: 'string',
|
|
193
193
|
default: '',
|
|
194
194
|
placeholder: 'id,title,created',
|
|
195
|
-
description: '
|
|
195
|
+
description: '要返回的字段(逗号分隔)',
|
|
196
196
|
},
|
|
197
197
|
],
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
|
-
displayName: '
|
|
200
|
+
displayName: '高级选项',
|
|
201
201
|
name: 'options',
|
|
202
202
|
type: 'collection',
|
|
203
|
-
placeholder: '
|
|
203
|
+
placeholder: '添加选项',
|
|
204
204
|
default: {},
|
|
205
205
|
displayOptions: {
|
|
206
206
|
show: {
|
|
@@ -210,12 +210,12 @@ exports.recordFields = [
|
|
|
210
210
|
},
|
|
211
211
|
options: [
|
|
212
212
|
{
|
|
213
|
-
displayName: '
|
|
213
|
+
displayName: '展开关联',
|
|
214
214
|
name: 'expand',
|
|
215
215
|
type: 'string',
|
|
216
216
|
default: '',
|
|
217
217
|
placeholder: 'author,tags',
|
|
218
|
-
description: '
|
|
218
|
+
description: '要展开的关联字段(逗号分隔)',
|
|
219
219
|
},
|
|
220
220
|
],
|
|
221
221
|
},
|
package/package.json
CHANGED