n8n-nodes-olivetin 0.1.0 → 0.4.0
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/README.md +5 -43
- package/dist/credentials/OliveTinApi.credentials.d.ts +2 -1
- package/dist/credentials/OliveTinApi.credentials.js +15 -15
- package/dist/credentials/OliveTinApi.credentials.js.map +1 -1
- package/dist/nodes/OliveTin/Olivetin.node.d.ts +5 -0
- package/dist/nodes/OliveTin/Olivetin.node.js +64 -0
- package/dist/nodes/OliveTin/Olivetin.node.js.map +1 -0
- package/dist/nodes/OliveTin/Olivetin.node.json +18 -0
- package/dist/package.json +4 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -6
- package/dist/nodes/StartNode/OliveTinLogo.svg +0 -109
- package/dist/nodes/StartNode/StartNode.node.d.ts +0 -5
- package/dist/nodes/StartNode/StartNode.node.js +0 -68
- package/dist/nodes/StartNode/StartNode.node.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,48 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
# OliveTin n8n Node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Community node for [n8n](https://n8n.io) that lets you trigger [OliveTin](https://olivetin.app) actions from your n8n workflows.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
To make your custom node available to the community, you must create it as an npm package, and [submit it to the npm registry](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
|
|
8
|
-
|
|
9
|
-
If you would like your node to be available on n8n cloud you can also [submit your node for verification](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/).
|
|
10
|
-
|
|
11
|
-
## Prerequisites
|
|
12
|
-
|
|
13
|
-
You need the following installed on your development machine:
|
|
14
|
-
|
|
15
|
-
* [git](https://git-scm.com/downloads)
|
|
16
|
-
* Node.js and npm. Minimum version Node 20. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL [here](https://github.com/nvm-sh/nvm). For Windows users, refer to Microsoft's guide to [Install NodeJS on Windows](https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows).
|
|
17
|
-
* Install n8n with:
|
|
18
|
-
```
|
|
19
|
-
npm install n8n -g
|
|
20
|
-
```
|
|
21
|
-
* Recommended: follow n8n's guide to [set up your development environment](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/).
|
|
22
|
-
|
|
23
|
-
## Using this starter
|
|
24
|
-
|
|
25
|
-
These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the [documentation](https://docs.n8n.io/integrations/creating-nodes/).
|
|
26
|
-
|
|
27
|
-
1. [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template repository.
|
|
28
|
-
2. Clone your new repo:
|
|
29
|
-
```
|
|
30
|
-
git clone https://github.com/<your organization>/<your-repo-name>.git
|
|
31
|
-
```
|
|
32
|
-
3. Run `npm i` to install dependencies.
|
|
33
|
-
4. Open the project in your editor.
|
|
34
|
-
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
|
|
35
|
-
6. Update the `package.json` to match your details.
|
|
36
|
-
7. Run `npm run lint` to check for errors or `npm run lintfix` to automatically fix errors when possible.
|
|
37
|
-
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
|
|
38
|
-
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
|
|
39
|
-
10. Update the LICENSE file to use your details.
|
|
40
|
-
11. [Publish](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry) your package to npm.
|
|
41
|
-
|
|
42
|
-
## More information
|
|
43
|
-
|
|
44
|
-
Refer to our [documentation on creating nodes](https://docs.n8n.io/integrations/creating-nodes/) for detailed information on building your own nodes.
|
|
5
|
+
- **npm package:** `n8n-nodes-olivetin`
|
|
6
|
+
- **Docs (install & use):** [OliveTin n8n integration](https://docs.olivetin.app/integrations/n8n.html)
|
|
45
7
|
|
|
46
8
|
## License
|
|
47
9
|
|
|
48
|
-
[MIT](
|
|
10
|
+
[MIT](LICENSE.md)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
1
|
+
import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare class OliveTinApi implements ICredentialType {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
5
6
|
documentationUrl: string;
|
|
6
7
|
properties: INodeProperties[];
|
|
7
8
|
authenticate: IAuthenticateGeneric;
|
|
@@ -3,38 +3,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OliveTinApi = void 0;
|
|
4
4
|
class OliveTinApi {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.name = '
|
|
7
|
-
this.displayName = '
|
|
8
|
-
this.
|
|
6
|
+
this.name = 'olivetinApi';
|
|
7
|
+
this.displayName = 'OliveTin API';
|
|
8
|
+
this.icon = { light: 'file:../icons/OliveTinLogo.svg', dark: 'file:../icons/OliveTinLogo.svg' };
|
|
9
|
+
this.documentationUrl = 'https://docs.olivetin.app/integrations/n8n.html';
|
|
9
10
|
this.properties = [
|
|
10
11
|
{
|
|
11
|
-
displayName: 'Token',
|
|
12
|
-
name: '
|
|
12
|
+
displayName: 'Access Token',
|
|
13
|
+
name: 'accessToken',
|
|
13
14
|
type: 'string',
|
|
15
|
+
typeOptions: { password: true },
|
|
14
16
|
default: '',
|
|
15
|
-
typeOptions: {
|
|
16
|
-
password: true,
|
|
17
|
-
}
|
|
18
17
|
},
|
|
19
18
|
{
|
|
20
|
-
displayName: '
|
|
21
|
-
name: '
|
|
19
|
+
displayName: 'Sever address',
|
|
20
|
+
name: 'serverAddress',
|
|
22
21
|
type: 'string',
|
|
23
|
-
default: '
|
|
24
|
-
}
|
|
22
|
+
default: 'http://olivetin.example.com'
|
|
23
|
+
}
|
|
25
24
|
];
|
|
26
25
|
this.authenticate = {
|
|
27
26
|
type: 'generic',
|
|
28
27
|
properties: {
|
|
29
28
|
headers: {
|
|
30
|
-
Authorization: '={{
|
|
29
|
+
Authorization: '=token {{$credentials?.accessToken}}',
|
|
31
30
|
},
|
|
32
31
|
},
|
|
33
32
|
};
|
|
34
33
|
this.test = {
|
|
35
34
|
request: {
|
|
36
|
-
baseURL: '={{$credentials
|
|
37
|
-
url: '/
|
|
35
|
+
baseURL: '= {{$credentials.serverAddress}}/api/',
|
|
36
|
+
url: '/Init',
|
|
37
|
+
method: 'POST',
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OliveTinApi.credentials.js","sourceRoot":"","sources":["../../credentials/OliveTinApi.credentials.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"OliveTinApi.credentials.js","sourceRoot":"","sources":["../../credentials/OliveTinApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QAErB,gBAAW,GAAG,cAAc,CAAC;QAE7B,SAAI,GAAS,EAAE,KAAK,EAAE,gCAAgC,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAAC;QAEjG,qBAAgB,GACf,iDAAiD,CAAC;QAEnD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6BAA6B;aACtC;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,sCAAsC;iBACrD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,uCAAuC;gBAChD,GAAG,EAAE,OAAO;gBACZ,MAAM,EAAE,MAAM;aACd;SACD,CAAC;IACH,CAAC;CAAA;AA1CD,kCA0CC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class Olivetin implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Olivetin = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class Olivetin {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'OliveTin ',
|
|
9
|
+
name: 'olivetin',
|
|
10
|
+
icon: { light: 'file:../../icons/OliveTinLogo.svg', dark: 'file:../../icons/OliveTinLogo.svg' },
|
|
11
|
+
group: ['input'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
14
|
+
description: 'Use the OliveTin API',
|
|
15
|
+
defaults: {
|
|
16
|
+
name: 'OliveTin',
|
|
17
|
+
},
|
|
18
|
+
usableAsTool: true,
|
|
19
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
20
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
+
credentials: [
|
|
22
|
+
{
|
|
23
|
+
name: 'olivetinApi',
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
requestDefaults: {
|
|
28
|
+
baseURL: '= {{$credentials.serverAddress}}/api/',
|
|
29
|
+
headers: {
|
|
30
|
+
Accept: 'application/json',
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
properties: [],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
async execute() {
|
|
38
|
+
const credentials = await this.getCredentials('olivetinApi');
|
|
39
|
+
const requestData = {
|
|
40
|
+
bindingId: this.getNodeParameter('bindingId', 0),
|
|
41
|
+
};
|
|
42
|
+
const headers = {
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
};
|
|
45
|
+
const response = this.helpers.httpRequest({
|
|
46
|
+
method: 'POST',
|
|
47
|
+
body: requestData,
|
|
48
|
+
url: `${credentials.serverAddress}/api/StartAction`,
|
|
49
|
+
headers,
|
|
50
|
+
json: true
|
|
51
|
+
});
|
|
52
|
+
const item = {
|
|
53
|
+
json: {
|
|
54
|
+
response,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
const ret = [
|
|
58
|
+
[item]
|
|
59
|
+
];
|
|
60
|
+
return ret;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.Olivetin = Olivetin;
|
|
64
|
+
//# sourceMappingURL=Olivetin.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Olivetin.node.js","sourceRoot":"","sources":["../../../nodes/OliveTin/Olivetin.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AAatB,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,EAAE,KAAK,EAAE,mCAAmC,EAAE,IAAI,EAAE,mCAAmC,EAAE;YAC/F,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8D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": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Developer Tools"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://docs.olivetin.app/integrations/n8n.html"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://docs.olivetin.app/integrations/n8n.html"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-olivetin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A n8n plugin for OliveTin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/OliveTin/
|
|
16
|
+
"url": "https://github.com/OliveTin/n8n-nodes-OliveTin.git"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=20.15"
|
|
@@ -33,12 +33,10 @@
|
|
|
33
33
|
"n8n": {
|
|
34
34
|
"n8nNodesApiVersion": 1,
|
|
35
35
|
"credentials": [
|
|
36
|
-
"dist/credentials/
|
|
37
|
-
"dist/credentials/HttpBinApi.credentials.js"
|
|
36
|
+
"dist/credentials/OliveTinApi.credentials.js"
|
|
38
37
|
],
|
|
39
38
|
"nodes": [
|
|
40
|
-
"dist/nodes/
|
|
41
|
-
"dist/nodes/HttpBin/HttpBin.node.js"
|
|
39
|
+
"dist/nodes/OliveTin/Olivetin.node.js"
|
|
42
40
|
]
|
|
43
41
|
},
|
|
44
42
|
"devDependencies": {
|