n8n-nodes-pocketbase 0.3.2 → 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.d.ts +6 -1
- package/dist/credentials/PocketBaseApi.credentials.js +54 -7
- package/dist/credentials/PocketBaseApi.credentials.js.map +1 -1
- package/dist/nodes/PocketbaseHttp/GenericFunctions.d.ts +6 -0
- package/dist/nodes/PocketbaseHttp/GenericFunctions.js +42 -0
- package/dist/nodes/PocketbaseHttp/GenericFunctions.js.map +1 -0
- package/dist/nodes/PocketbaseHttp/LoadOptions.d.ts +28 -0
- package/dist/nodes/PocketbaseHttp/LoadOptions.js +88 -0
- package/dist/nodes/PocketbaseHttp/LoadOptions.js.map +1 -0
- package/dist/nodes/PocketbaseHttp/PocketbaseHttp.node.d.ts +12 -0
- package/dist/nodes/PocketbaseHttp/PocketbaseHttp.node.js +334 -0
- package/dist/nodes/PocketbaseHttp/PocketbaseHttp.node.js.map +1 -0
- package/dist/nodes/PocketbaseHttp/RequestBodyFunctions.d.ts +2 -0
- package/dist/nodes/PocketbaseHttp/RequestBodyFunctions.js +52 -0
- package/dist/nodes/PocketbaseHttp/RequestBodyFunctions.js.map +1 -0
- package/dist/package.json +18 -22
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -22
- package/dist/nodes/PocketBase/PocketBase.node.d.ts +0 -5
- package/dist/nodes/PocketBase/PocketBase.node.js +0 -261
- package/dist/nodes/PocketBase/PocketBase.node.js.map +0 -1
- package/dist/nodes/PocketBaseSend/PocketBaseSend.node.d.ts +0 -5
- package/dist/nodes/PocketBaseSend/PocketBaseSend.node.js +0 -90
- package/dist/nodes/PocketBaseSend/PocketBaseSend.node.js.map +0 -1
- package/dist/nodes/PocketBaseSend/PocketBaseSend.node.json +0 -23
- /package/dist/{nodes/PocketBase → credentials}/pocketbase.svg +0 -0
- /package/dist/nodes/{PocketBase/PocketBase.node.json → PocketbaseHttp/Pocketbase.node.json} +0 -0
- /package/dist/nodes/{PocketBaseSend → PocketbaseHttp}/pocketbase.svg +0 -0
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
1
|
+
import { IAuthenticate, IconFile, ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, IHttpRequestHelper, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare class PocketBaseApi implements ICredentialType {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
5
|
documentationUrl: string;
|
|
6
6
|
properties: INodeProperties[];
|
|
7
7
|
test: ICredentialTestRequest;
|
|
8
|
+
preAuthentication(this: IHttpRequestHelper, credentials: ICredentialDataDecryptedObject): Promise<{
|
|
9
|
+
token: string;
|
|
10
|
+
}>;
|
|
11
|
+
authenticate: IAuthenticate;
|
|
12
|
+
icon: IconFile;
|
|
8
13
|
}
|
|
@@ -12,7 +12,7 @@ class PocketBaseApi {
|
|
|
12
12
|
name: 'url',
|
|
13
13
|
type: 'string',
|
|
14
14
|
default: '',
|
|
15
|
-
required: true
|
|
15
|
+
required: true,
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
displayName: 'User collection name',
|
|
@@ -20,14 +20,14 @@ class PocketBaseApi {
|
|
|
20
20
|
name: 'userCollection',
|
|
21
21
|
type: 'string',
|
|
22
22
|
default: '_superusers',
|
|
23
|
-
required: true
|
|
23
|
+
required: true,
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
displayName: 'Username',
|
|
27
27
|
name: 'username',
|
|
28
28
|
type: 'string',
|
|
29
29
|
default: '',
|
|
30
|
-
required: true
|
|
30
|
+
required: true,
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
displayName: 'Password',
|
|
@@ -37,8 +37,18 @@ class PocketBaseApi {
|
|
|
37
37
|
password: true,
|
|
38
38
|
},
|
|
39
39
|
default: '',
|
|
40
|
-
required: true
|
|
41
|
-
}
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Session Token',
|
|
44
|
+
name: 'token',
|
|
45
|
+
type: 'hidden',
|
|
46
|
+
typeOptions: {
|
|
47
|
+
expirable: true,
|
|
48
|
+
password: true,
|
|
49
|
+
},
|
|
50
|
+
default: '',
|
|
51
|
+
},
|
|
42
52
|
];
|
|
43
53
|
this.test = {
|
|
44
54
|
request: {
|
|
@@ -48,9 +58,46 @@ class PocketBaseApi {
|
|
|
48
58
|
body: {
|
|
49
59
|
identity: '={{$credentials?.username}}',
|
|
50
60
|
password: '={{$credentials?.password}}',
|
|
51
|
-
}
|
|
52
|
-
}
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
rules: [
|
|
64
|
+
{
|
|
65
|
+
type: 'responseCode',
|
|
66
|
+
properties: {
|
|
67
|
+
value: 200,
|
|
68
|
+
message: 'Test',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'responseCode',
|
|
73
|
+
properties: {
|
|
74
|
+
value: 400,
|
|
75
|
+
message: 'An error occurred during login',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
this.authenticate = {
|
|
81
|
+
type: 'generic',
|
|
82
|
+
properties: {
|
|
83
|
+
headers: {
|
|
84
|
+
Authorization: '={{ $credentials.token }}',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
53
87
|
};
|
|
88
|
+
this.icon = 'file:pocketbase.svg';
|
|
89
|
+
}
|
|
90
|
+
async preAuthentication(credentials) {
|
|
91
|
+
const { username, password, url, userCollection } = credentials;
|
|
92
|
+
const { token } = (await this.helpers.httpRequest({
|
|
93
|
+
method: 'POST',
|
|
94
|
+
url: `${url.endsWith('/') ? url.slice(0, -1) : url}/api/collections/${userCollection}/auth-with-password`,
|
|
95
|
+
body: {
|
|
96
|
+
identity: username,
|
|
97
|
+
password,
|
|
98
|
+
},
|
|
99
|
+
}));
|
|
100
|
+
return { token };
|
|
54
101
|
}
|
|
55
102
|
}
|
|
56
103
|
exports.PocketBaseApi = PocketBaseApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PocketBaseApi.credentials.js","sourceRoot":"","sources":["../../credentials/PocketBaseApi.credentials.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PocketBaseApi.credentials.js","sourceRoot":"","sources":["../../credentials/PocketBaseApi.credentials.ts"],"names":[],"mappings":";;;AAiBA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,qBAAgB,GAAG,4CAA4C,CAAC;QAChE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,KAAK;gBAClB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,sBAAsB;gBACnC,WAAW,EACV,0HAA0H;gBAC3H,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,aAAa;gBACtB,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,SAAS,EAAE,IAAI;oBACf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AAK,EAAE,CAAC;IAClB,CAAC;CAYD;AAtGD,sCAsGC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DeclarativeRestApiSettings, IExecutePaginationFunctions, IExecuteSingleFunctions, IHttpRequestOptions, INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
export declare function recordViewPreSendAction(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
3
|
+
export declare function recordViewPostReceiveAction(this: IExecuteSingleFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
|
|
4
|
+
export declare function recordUpdatePreSendAction(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
5
|
+
export declare function recordCreatePreSendAction(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
6
|
+
export declare function pagination(this: IExecutePaginationFunctions, requestOptions: DeclarativeRestApiSettings.ResultOptions): Promise<INodeExecutionData[]>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recordViewPreSendAction = recordViewPreSendAction;
|
|
4
|
+
exports.recordViewPostReceiveAction = recordViewPostReceiveAction;
|
|
5
|
+
exports.recordUpdatePreSendAction = recordUpdatePreSendAction;
|
|
6
|
+
exports.recordCreatePreSendAction = recordCreatePreSendAction;
|
|
7
|
+
exports.pagination = pagination;
|
|
8
|
+
const RequestBodyFunctions_1 = require("./RequestBodyFunctions");
|
|
9
|
+
async function recordViewPreSendAction(requestOptions) {
|
|
10
|
+
this.logger.info(`Request URL: ${requestOptions.url} | ${JSON.stringify(requestOptions.qs)}`);
|
|
11
|
+
return requestOptions;
|
|
12
|
+
}
|
|
13
|
+
async function recordViewPostReceiveAction(items) {
|
|
14
|
+
return items;
|
|
15
|
+
}
|
|
16
|
+
async function recordUpdatePreSendAction(requestOptions) {
|
|
17
|
+
return await RequestBodyFunctions_1.prepareRequestBody.call(this, requestOptions);
|
|
18
|
+
}
|
|
19
|
+
async function recordCreatePreSendAction(requestOptions) {
|
|
20
|
+
return await RequestBodyFunctions_1.prepareRequestBody.call(this, requestOptions);
|
|
21
|
+
}
|
|
22
|
+
async function pagination(requestOptions) {
|
|
23
|
+
var _a;
|
|
24
|
+
var _b;
|
|
25
|
+
const allIsActive = this.getNodeParameter('parameters.allElements', false);
|
|
26
|
+
let executions = [];
|
|
27
|
+
let page = this.getNodeParameter('parameters.page', 1);
|
|
28
|
+
let totalPages = page + 1;
|
|
29
|
+
(_a = (_b = requestOptions.options).qs) !== null && _a !== void 0 ? _a : (_b.qs = {});
|
|
30
|
+
do {
|
|
31
|
+
requestOptions.options.qs.page = page;
|
|
32
|
+
const responseData = await this.makeRoutingRequest(requestOptions);
|
|
33
|
+
page = responseData[0].json.page;
|
|
34
|
+
if (allIsActive) {
|
|
35
|
+
totalPages = responseData[0].json.totalPages;
|
|
36
|
+
}
|
|
37
|
+
executions = executions.concat(responseData[0].json.items.map((item) => ({ json: item })));
|
|
38
|
+
page++;
|
|
39
|
+
} while (page < totalPages);
|
|
40
|
+
return executions;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=GenericFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/PocketbaseHttp/GenericFunctions.ts"],"names":[],"mappings":";;AAUA,0DAMC;AAED,kEAKC;AAED,8DAKC;AAED,8DAKC;AAED,gCAwBC;AAvDD,iEAA4D;AAErD,KAAK,UAAU,uBAAuB,CAE5C,cAAmC;IAEnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC9F,OAAO,cAAc,CAAC;AACvB,CAAC;AAEM,KAAK,UAAU,2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;QACF,IAAI,EAAE,CAAC;IACR,CAAC,QAAQ,IAAI,GAAG,UAAU,EAAE;IAE5B,OAAO,UAAU,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export interface PocketBaseField {
|
|
3
|
+
autogeneratePattern?: string;
|
|
4
|
+
hidden: boolean;
|
|
5
|
+
id: string;
|
|
6
|
+
max?: number | string;
|
|
7
|
+
min?: number | string;
|
|
8
|
+
name: string;
|
|
9
|
+
pattern?: string;
|
|
10
|
+
presentable: boolean;
|
|
11
|
+
primaryKey?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
system: boolean;
|
|
14
|
+
type: string;
|
|
15
|
+
maxSelect?: number;
|
|
16
|
+
values?: string[];
|
|
17
|
+
onCreate?: boolean;
|
|
18
|
+
onUpdate?: boolean;
|
|
19
|
+
cascadeDelete?: boolean;
|
|
20
|
+
collectionId?: string;
|
|
21
|
+
minSelect?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const LoadOptions: {
|
|
24
|
+
getCollections(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
25
|
+
getFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
26
|
+
getRelations(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
27
|
+
getRows(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoadOptions = void 0;
|
|
4
|
+
async function loadPocketBaseFields(collectionName = null) {
|
|
5
|
+
const { url } = await this.getCredentials('pocketBaseApi');
|
|
6
|
+
const resource = collectionName
|
|
7
|
+
? collectionName
|
|
8
|
+
: this.getNodeParameter('resource');
|
|
9
|
+
const { fields } = await this.helpers.httpRequestWithAuthentication.call(this, 'pocketBaseApi', {
|
|
10
|
+
url: `${url}/api/collections/${resource}`,
|
|
11
|
+
method: 'GET',
|
|
12
|
+
});
|
|
13
|
+
return fields;
|
|
14
|
+
}
|
|
15
|
+
exports.LoadOptions = {
|
|
16
|
+
async getCollections() {
|
|
17
|
+
const returnData = [];
|
|
18
|
+
const { url } = await this.getCredentials('pocketBaseApi');
|
|
19
|
+
const { items } = await this.helpers.httpRequestWithAuthentication.call(this, 'pocketBaseApi', {
|
|
20
|
+
url: `${url}/api/collections`,
|
|
21
|
+
method: 'GET',
|
|
22
|
+
});
|
|
23
|
+
items.forEach(({ name }) => {
|
|
24
|
+
returnData.push({
|
|
25
|
+
name,
|
|
26
|
+
value: name,
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
return returnData;
|
|
30
|
+
},
|
|
31
|
+
async getFields() {
|
|
32
|
+
const returnData = [];
|
|
33
|
+
const fields = await loadPocketBaseFields.call(this);
|
|
34
|
+
fields.forEach(({ name, type }) => {
|
|
35
|
+
if (type === 'relation') {
|
|
36
|
+
returnData.push({
|
|
37
|
+
name: `All fields from relation '${name}'`,
|
|
38
|
+
value: `expand.${name}.*`
|
|
39
|
+
});
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
returnData.push({
|
|
43
|
+
name,
|
|
44
|
+
value: name,
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
return returnData;
|
|
48
|
+
},
|
|
49
|
+
async getRelations() {
|
|
50
|
+
const returnData = [];
|
|
51
|
+
const fields = await loadPocketBaseFields.call(this);
|
|
52
|
+
fields.forEach(({ name, type }) => {
|
|
53
|
+
if (type !== 'relation') {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
returnData.push({
|
|
57
|
+
name,
|
|
58
|
+
value: name,
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
return returnData;
|
|
62
|
+
},
|
|
63
|
+
async getRows() {
|
|
64
|
+
const returnData = [];
|
|
65
|
+
const { url } = await this.getCredentials('pocketBaseApi');
|
|
66
|
+
const resource = this.getNodeParameter('resource');
|
|
67
|
+
const { items } = await this.helpers.httpRequestWithAuthentication.call(this, 'pocketBaseApi', {
|
|
68
|
+
url: `${url}/api/collections/${resource}/records?sort=-created`,
|
|
69
|
+
method: 'GET',
|
|
70
|
+
});
|
|
71
|
+
items.forEach(({ id, ...data }) => {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
const name = (_b = (_a = Object.entries(data).filter(([key]) => {
|
|
74
|
+
return key === 'name';
|
|
75
|
+
})) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[1];
|
|
76
|
+
const shortColumns = Object.fromEntries(Object.entries(data).filter(([, column]) => {
|
|
77
|
+
const serialized = JSON.stringify(column);
|
|
78
|
+
return serialized.length <= 20 && serialized.length > 2;
|
|
79
|
+
}));
|
|
80
|
+
returnData.push({
|
|
81
|
+
name: name ? name : JSON.stringify(shortColumns).substring(1, 100),
|
|
82
|
+
value: id,
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
return returnData;
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=LoadOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadOptions.js","sourceRoot":"","sources":["../../../nodes/PocketbaseHttp/LoadOptions.ts"],"names":[],"mappings":";;;AAwBA,KAAK,UAAU,oBAAoB,CAElC,iBAAgC,IAAI;IAEpC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAAG,cAAc;QAC9B,CAAC,CAAC,cAAc;QAChB,CAAC,CAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAuB,CAAC;IAC5D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,EAAE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Y,GAAG,MAAM,CAAC,WAAW,CACtC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE;gBAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBAC1C,OAAO,UAAU,CAAC,MAAM,IAAI,EAAE,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;YACzD,CAAC,CAAC,CACF,CAAC;YAEF,UAAU,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;gBAClE,KAAK,EAAE,EAAE;aACT,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class PocketbaseHttp implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getCollections(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
7
|
+
getFields(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
8
|
+
getRelations(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
9
|
+
getRows(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PocketbaseHttp = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
6
|
+
const LoadOptions_1 = require("./LoadOptions");
|
|
7
|
+
class PocketbaseHttp {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.description = {
|
|
10
|
+
displayName: 'PocketBase HTTP API',
|
|
11
|
+
name: 'pocketbaseHttp',
|
|
12
|
+
icon: 'file:pocketbase.svg',
|
|
13
|
+
group: ['transform'],
|
|
14
|
+
version: 1,
|
|
15
|
+
subtitle: '={{$parameter["operation"] + " " + $parameter["resource"]}}',
|
|
16
|
+
description: 'Consume PocketBase HTTP API',
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'PocketBase',
|
|
19
|
+
},
|
|
20
|
+
usableAsTool: true,
|
|
21
|
+
codex: {
|
|
22
|
+
categories: ['AI'],
|
|
23
|
+
subcategories: {
|
|
24
|
+
AI: ['Tools'],
|
|
25
|
+
Tools: ['Other Tools'],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
29
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
30
|
+
credentials: [
|
|
31
|
+
{
|
|
32
|
+
name: 'pocketBaseApi',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
requestDefaults: {
|
|
37
|
+
returnFullResponse: true,
|
|
38
|
+
baseURL: '={{$credentials.url.replace(new RegExp("/$"), "")}}',
|
|
39
|
+
headers: {
|
|
40
|
+
Accept: 'application/json',
|
|
41
|
+
'Content-Type': 'application/json',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
properties: [
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Collection Name or ID',
|
|
47
|
+
name: 'resource',
|
|
48
|
+
type: 'options',
|
|
49
|
+
default: '',
|
|
50
|
+
noDataExpression: true,
|
|
51
|
+
required: true,
|
|
52
|
+
typeOptions: {
|
|
53
|
+
loadOptionsMethod: 'getCollections',
|
|
54
|
+
},
|
|
55
|
+
description: 'The Resource (PB: Collection) you are working on/with. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Operation',
|
|
59
|
+
name: 'operation',
|
|
60
|
+
type: 'options',
|
|
61
|
+
options: [
|
|
62
|
+
{
|
|
63
|
+
name: 'List/Search',
|
|
64
|
+
value: 'search',
|
|
65
|
+
action: 'List or search your collection',
|
|
66
|
+
routing: {
|
|
67
|
+
request: {
|
|
68
|
+
method: 'GET',
|
|
69
|
+
url: '=/api/collections/{{$parameter["resource"]}}/records',
|
|
70
|
+
},
|
|
71
|
+
output: {
|
|
72
|
+
postReceive: [GenericFunctions_1.recordViewPostReceiveAction],
|
|
73
|
+
},
|
|
74
|
+
send: {
|
|
75
|
+
preSend: [GenericFunctions_1.recordViewPreSendAction],
|
|
76
|
+
paginate: true,
|
|
77
|
+
},
|
|
78
|
+
operations: { pagination: GenericFunctions_1.pagination },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'View',
|
|
83
|
+
value: 'view',
|
|
84
|
+
action: 'View an element in your collection',
|
|
85
|
+
routing: {
|
|
86
|
+
request: {
|
|
87
|
+
method: 'GET',
|
|
88
|
+
url: `=/api/collections/{{$parameter["resource"]}}/records/{{$parameter["elementId"]}}`,
|
|
89
|
+
},
|
|
90
|
+
send: {
|
|
91
|
+
preSend: [GenericFunctions_1.recordViewPreSendAction],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'Create',
|
|
97
|
+
value: 'create',
|
|
98
|
+
action: 'Create an element in your collection',
|
|
99
|
+
routing: {
|
|
100
|
+
request: {
|
|
101
|
+
method: 'POST',
|
|
102
|
+
url: `=/api/collections/{{$parameter["resource"]}}/records`,
|
|
103
|
+
},
|
|
104
|
+
send: {
|
|
105
|
+
preSend: [GenericFunctions_1.recordCreatePreSendAction],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'Update',
|
|
111
|
+
value: 'update',
|
|
112
|
+
action: 'Update an element in your collection',
|
|
113
|
+
routing: {
|
|
114
|
+
request: {
|
|
115
|
+
method: 'PATCH',
|
|
116
|
+
url: `=/api/collections/{{$parameter["resource"]}}/records/{{$parameter["elementId"]}}`,
|
|
117
|
+
},
|
|
118
|
+
send: {
|
|
119
|
+
preSend: [GenericFunctions_1.recordUpdatePreSendAction],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
default: 'search',
|
|
125
|
+
required: true,
|
|
126
|
+
noDataExpression: true,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
displayName: 'Element Name or ID',
|
|
130
|
+
name: 'elementId',
|
|
131
|
+
type: 'options',
|
|
132
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
133
|
+
typeOptions: {
|
|
134
|
+
loadOptionsDependsOn: ['resource', 'parameters.fields'],
|
|
135
|
+
loadOptionsMethod: 'getRows',
|
|
136
|
+
},
|
|
137
|
+
default: '',
|
|
138
|
+
displayOptions: {
|
|
139
|
+
show: {
|
|
140
|
+
operation: ['view', 'update'],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
displayName: 'Parameters',
|
|
146
|
+
name: 'parameters',
|
|
147
|
+
type: 'collection',
|
|
148
|
+
default: {},
|
|
149
|
+
options: [
|
|
150
|
+
{
|
|
151
|
+
displayName: 'All Elements',
|
|
152
|
+
name: 'allElements',
|
|
153
|
+
type: 'boolean',
|
|
154
|
+
default: false,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
displayName: 'Elements per Page',
|
|
158
|
+
name: 'elementsPerPage',
|
|
159
|
+
type: 'number',
|
|
160
|
+
typeOptions: {
|
|
161
|
+
minValue: 1,
|
|
162
|
+
},
|
|
163
|
+
default: 30,
|
|
164
|
+
routing: {
|
|
165
|
+
send: {
|
|
166
|
+
type: 'query',
|
|
167
|
+
property: 'perPage'
|
|
168
|
+
},
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
displayName: 'Expand Relations',
|
|
173
|
+
description: 'Choose from the list, or specify the Name using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
174
|
+
name: 'relation',
|
|
175
|
+
type: 'multiOptions',
|
|
176
|
+
default: [],
|
|
177
|
+
typeOptions: {
|
|
178
|
+
loadOptionsMethod: 'getRelations',
|
|
179
|
+
},
|
|
180
|
+
routing: {
|
|
181
|
+
request: {
|
|
182
|
+
qs: {
|
|
183
|
+
expand: '={{ $value ? $value.join(",") : undefined }}',
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
displayName: 'Field Names',
|
|
190
|
+
description: 'Choose from the list, or specify Names using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
191
|
+
name: 'fields',
|
|
192
|
+
type: 'multiOptions',
|
|
193
|
+
typeOptions: {
|
|
194
|
+
loadOptionsMethod: 'getFields',
|
|
195
|
+
},
|
|
196
|
+
default: [],
|
|
197
|
+
routing: {
|
|
198
|
+
request: {
|
|
199
|
+
qs: {
|
|
200
|
+
fields: '={{ $value ? $value.join(",") : undefined }}',
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
displayName: 'Filter',
|
|
207
|
+
name: 'filter',
|
|
208
|
+
type: 'string',
|
|
209
|
+
default: '',
|
|
210
|
+
routing: {
|
|
211
|
+
send: {
|
|
212
|
+
type: 'query',
|
|
213
|
+
property: 'filter'
|
|
214
|
+
},
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
displayName: 'Page',
|
|
219
|
+
name: 'page',
|
|
220
|
+
type: 'number',
|
|
221
|
+
typeOptions: {
|
|
222
|
+
minValue: 1,
|
|
223
|
+
},
|
|
224
|
+
default: 1,
|
|
225
|
+
routing: {
|
|
226
|
+
send: {
|
|
227
|
+
type: 'query',
|
|
228
|
+
property: 'page'
|
|
229
|
+
},
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
displayName: 'Sort',
|
|
234
|
+
name: 'sort',
|
|
235
|
+
type: 'string',
|
|
236
|
+
default: '',
|
|
237
|
+
routing: {
|
|
238
|
+
send: {
|
|
239
|
+
type: 'query',
|
|
240
|
+
property: 'sort'
|
|
241
|
+
},
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
displayName: 'Body Type',
|
|
248
|
+
name: 'bodyType',
|
|
249
|
+
type: 'multiOptions',
|
|
250
|
+
displayOptions: {
|
|
251
|
+
show: {
|
|
252
|
+
operation: ['create', 'update'],
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
default: ['fields'],
|
|
256
|
+
options: [
|
|
257
|
+
{
|
|
258
|
+
name: 'Fields',
|
|
259
|
+
value: 'fields',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: 'JSON Body',
|
|
263
|
+
value: 'bodyJson',
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: 'Binary Data',
|
|
267
|
+
value: 'binaryData',
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
displayName: 'Fields',
|
|
273
|
+
name: 'fields',
|
|
274
|
+
type: 'assignmentCollection',
|
|
275
|
+
displayOptions: {
|
|
276
|
+
show: {
|
|
277
|
+
operation: ['create', 'update'],
|
|
278
|
+
bodyType: ['fields'],
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
typeOptions: {
|
|
282
|
+
loadOptionsDependsOn: ['resource'],
|
|
283
|
+
loadOptionsMethod: 'getFields',
|
|
284
|
+
},
|
|
285
|
+
default: [],
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
displayName: 'JSON Body',
|
|
289
|
+
name: 'bodyJson',
|
|
290
|
+
type: 'json',
|
|
291
|
+
displayOptions: {
|
|
292
|
+
show: {
|
|
293
|
+
operation: ['create', 'update'],
|
|
294
|
+
bodyType: ['bodyJson'],
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
default: '',
|
|
298
|
+
placeholder: 'Body according to the collection\'s schema',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
displayName: 'Binary Property Name',
|
|
302
|
+
name: 'binaryPropertyName',
|
|
303
|
+
type: 'string',
|
|
304
|
+
default: 'data',
|
|
305
|
+
displayOptions: {
|
|
306
|
+
show: {
|
|
307
|
+
operation: ['create', 'update'],
|
|
308
|
+
bodyType: ['binaryData'],
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
description: 'Name of the binary property which contains the data to be sent',
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
displayName: 'Binary Field Name',
|
|
315
|
+
name: 'binaryFieldName',
|
|
316
|
+
type: 'string',
|
|
317
|
+
default: '',
|
|
318
|
+
displayOptions: {
|
|
319
|
+
show: {
|
|
320
|
+
operation: ['create', 'update'],
|
|
321
|
+
bodyType: ['binaryData'],
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
description: 'Name of the binary field according to the collection\'s schema. If left empty, the binary data will be sent as a file attachment.',
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
};
|
|
328
|
+
this.methods = {
|
|
329
|
+
loadOptions: LoadOptions_1.LoadOptions,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
exports.PocketbaseHttp = PocketbaseHttp;
|
|
334
|
+
//# sourceMappingURL=PocketbaseHttp.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PocketbaseHttp.node.js","sourceRoot":"","sources":["../../../nodes/PocketbaseHttp/PocketbaseHttp.node.ts"],"names":[],"mappings":";;;AAAA,+CAIsB;AACtB,yDAM4B;AAC5B,+CAA4C;AAE5C,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,6DAA6D;YACvE,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE;gBACT,IAAI,EAAE,YAAY;aAClB;YACD,YAAY,EAAE,IAAI;YAClB,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAAO,CAAC;oBACb,KAAK,EAAE,CAAC,aAAa,CAAC;iBACtB;aACD;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,kBAAkB,EAAE,IAAI;gBACxB,OAAO,EAAE,qDAAqD;gBAC9D,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YAED,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,uBAAuB;oBACpC,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,EAAE;oBACX,gBAAgB,EAAE,IAAI;oBACtB,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE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