n8n-nodes-airprocess 0.1.6
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/LICENSE.md +19 -0
- package/README.md +120 -0
- package/dist/credentials/AirProcessApi.credentials.d.ts +20 -0
- package/dist/credentials/AirProcessApi.credentials.js +43 -0
- package/dist/credentials/AirProcessApi.credentials.js.map +1 -0
- package/dist/icons/airprocess.dark.svg +55 -0
- package/dist/icons/airprocess.svg +55 -0
- package/dist/nodes/AirProcess/AirProcess.node.d.ts +11 -0
- package/dist/nodes/AirProcess/AirProcess.node.js +881 -0
- package/dist/nodes/AirProcess/AirProcess.node.js.map +1 -0
- package/dist/nodes/AirProcess/AirProcess.node.json +13 -0
- package/dist/package.json +50 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +50 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2022 n8n
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# n8n-nodes-airprocess (AirProcess)
|
|
2
|
+
|
|
3
|
+
Community n8n node for AirProcess.
|
|
4
|
+
|
|
5
|
+
## What this package provides
|
|
6
|
+
|
|
7
|
+
- One node: `AirProcess`
|
|
8
|
+
- Route families grouped by HTTP method: `GET`, `POST`, `PATCH`, `DELETE`, `Custom`
|
|
9
|
+
- Dynamic model and field dropdowns loaded from AirProcess (`/model`)
|
|
10
|
+
|
|
11
|
+
## Supported operations
|
|
12
|
+
|
|
13
|
+
### GET
|
|
14
|
+
|
|
15
|
+
- `Get a Record`: `GET /{MODEL_ID}/{RECORD_ID}`
|
|
16
|
+
- `Get Records`: `GET /{MODEL_ID}`
|
|
17
|
+
- `Get Users`: `GET /account`
|
|
18
|
+
- `Get Applications`: `GET /application`
|
|
19
|
+
- `Get Groups`: `GET /group`
|
|
20
|
+
- `Get Workspaces`: `GET /workspace`
|
|
21
|
+
|
|
22
|
+
### POST
|
|
23
|
+
|
|
24
|
+
- `Create a Record`: `POST /{MODEL_ID}`
|
|
25
|
+
- `Specify Body = JSON`: send raw JSON body
|
|
26
|
+
- `Specify Body = Using Fields Below`: build payload from selected fields
|
|
27
|
+
- `Find Records (Mongo)`: `POST /{MODEL_ID}`
|
|
28
|
+
- Sends a search payload with:
|
|
29
|
+
- `operation: "search"`
|
|
30
|
+
- `filterSyntax: "mongo"`
|
|
31
|
+
- `skip`
|
|
32
|
+
- `limit`
|
|
33
|
+
- `filter` built from selected field/value pairs
|
|
34
|
+
- `Login`: `POST /login`
|
|
35
|
+
|
|
36
|
+
### PATCH
|
|
37
|
+
|
|
38
|
+
- `Update a Record`: `PATCH /{MODEL_ID}/{RECORD_ID}`
|
|
39
|
+
|
|
40
|
+
### DELETE
|
|
41
|
+
|
|
42
|
+
- `Delete a Record`: `DELETE /{MODEL_ID}/{RECORD_ID}`
|
|
43
|
+
- `Send to Trash`: `DELETE /{MODEL_ID}/{RECORD_ID}` with body `{ "sendToTrash": true }`
|
|
44
|
+
|
|
45
|
+
### Custom
|
|
46
|
+
|
|
47
|
+
- `Custom GET`, `Custom POST`, `Custom PATCH`, `Custom DELETE`
|
|
48
|
+
- Accepts relative path or full URL
|
|
49
|
+
- Optional request body (`Send Body`)
|
|
50
|
+
|
|
51
|
+
## Authentication
|
|
52
|
+
|
|
53
|
+
The node uses the package credential `AirProcess API` (`airProcessApi`) with an API token.
|
|
54
|
+
|
|
55
|
+
## Base URL
|
|
56
|
+
|
|
57
|
+
`https://app.airprocess.com`
|
|
58
|
+
|
|
59
|
+
## Local development
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm run dev
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Build
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm run build
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Lint
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm run lint
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Publish on npm (official/verified path)
|
|
78
|
+
|
|
79
|
+
1. Create an npm automation token and add it in your GitHub repository secrets as `NPM_TOKEN`.
|
|
80
|
+
2. Bump the package version in `package.json`.
|
|
81
|
+
3. Commit and push your changes.
|
|
82
|
+
4. Create a GitHub Release (or run the `Publish n8n Node to npm` workflow manually).
|
|
83
|
+
5. The workflow publishes with provenance (`npm publish --provenance`).
|
|
84
|
+
|
|
85
|
+
Workflow file:
|
|
86
|
+
|
|
87
|
+
- `.github/workflows/publish-npm.yml`
|
|
88
|
+
|
|
89
|
+
## Submit to n8n Creator Portal
|
|
90
|
+
|
|
91
|
+
After publishing your package, submit it through the n8n Creator Portal for verification.
|
|
92
|
+
|
|
93
|
+
Prepare these details:
|
|
94
|
+
|
|
95
|
+
- npm package name: `n8n-nodes-airprocess`
|
|
96
|
+
- repository URL: `https://github.com/Angelina974/n8n-connector.git`
|
|
97
|
+
- documentation: this `README.md`
|
|
98
|
+
- supported auth: `AirProcess API` credential (API token)
|
|
99
|
+
|
|
100
|
+
Recommended before submitting:
|
|
101
|
+
|
|
102
|
+
- `npm run lint`
|
|
103
|
+
- `npm run build`
|
|
104
|
+
- ensure the latest published npm version matches your GitHub release
|
|
105
|
+
|
|
106
|
+
## Example: Find Records (Mongo)
|
|
107
|
+
|
|
108
|
+
Example payload generated by the node:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"operation": "search",
|
|
113
|
+
"filterSyntax": "mongo",
|
|
114
|
+
"skip": 0,
|
|
115
|
+
"limit": 10,
|
|
116
|
+
"filter": {
|
|
117
|
+
"flddHGP8O6VWZGpaj": "Done"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class AirProcessApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
icon: {
|
|
7
|
+
readonly light: "file:../icons/airprocess.svg";
|
|
8
|
+
readonly dark: "file:../icons/airprocess.dark.svg";
|
|
9
|
+
};
|
|
10
|
+
properties: INodeProperties[];
|
|
11
|
+
authenticate: {
|
|
12
|
+
type: "generic";
|
|
13
|
+
properties: {
|
|
14
|
+
headers: {
|
|
15
|
+
Authorization: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
test: ICredentialTestRequest;
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AirProcessApi = void 0;
|
|
4
|
+
class AirProcessApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'airProcessApi';
|
|
7
|
+
this.displayName = 'AirProcess API';
|
|
8
|
+
this.documentationUrl = 'https://app.airprocess.com/';
|
|
9
|
+
this.icon = {
|
|
10
|
+
light: 'file:../icons/airprocess.svg',
|
|
11
|
+
dark: 'file:../icons/airprocess.dark.svg',
|
|
12
|
+
};
|
|
13
|
+
this.properties = [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'API Token',
|
|
16
|
+
name: 'token',
|
|
17
|
+
type: 'string',
|
|
18
|
+
typeOptions: {
|
|
19
|
+
password: true,
|
|
20
|
+
},
|
|
21
|
+
default: '',
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
this.authenticate = {
|
|
26
|
+
type: 'generic',
|
|
27
|
+
properties: {
|
|
28
|
+
headers: {
|
|
29
|
+
Authorization: '=Bearer {{$credentials.token}}',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
this.test = {
|
|
34
|
+
request: {
|
|
35
|
+
baseURL: 'https://app.airprocess.com',
|
|
36
|
+
url: '/model',
|
|
37
|
+
method: 'GET',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.AirProcessApi = AirProcessApi;
|
|
43
|
+
//# sourceMappingURL=AirProcessApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AirProcessApi.credentials.js","sourceRoot":"","sources":["../../credentials/AirProcessApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QAEvB,gBAAW,GAAG,gBAAgB,CAAC;QAE/B,qBAAgB,GAAG,6BAA6B,CAAC;QAEjD,SAAI,GAAG;YACN,KAAK,EAAE,8BAA8B;YACrC,IAAI,EAAE,mCAAmC;SAChC,CAAC;QAEX,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;SACD,CAAC;QAEF,iBAAY,GAAG;YACd,IAAI,EAAE,SAAkB;YACxB,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,gCAAgC;iBAC/C;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,4BAA4B;gBACrC,GAAG,EAAE,QAAQ;gBACb,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAzCD,sCAyCC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
2
|
+
width="100%" viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
|
|
3
|
+
<path fill="#02B7F9" opacity="1.000000" stroke="none"
|
|
4
|
+
d="
|
|
5
|
+
M74.000000,129.000000
|
|
6
|
+
C71.957680,129.000000 69.915367,129.000000 67.772049,128.750992
|
|
7
|
+
C66.708908,127.656410 65.856949,126.618690 64.768005,125.994247
|
|
8
|
+
C49.725960,117.368484 34.689728,108.730858 19.554077,100.271461
|
|
9
|
+
C16.318001,98.462799 14.807114,96.333038 14.920973,92.497559
|
|
10
|
+
C15.172501,84.024582 15.000065,75.539024 15.000205,67.058594
|
|
11
|
+
C15.000402,55.112404 15.000254,43.166214 15.000254,30.236784
|
|
12
|
+
C17.528019,31.219759 19.457926,31.782282 21.209347,32.689411
|
|
13
|
+
C25.178762,34.745327 29.060249,36.971008 33.142395,39.427052
|
|
14
|
+
C43.839382,45.753078 54.175705,52.164204 64.976448,57.663155
|
|
15
|
+
C71.529564,60.999523 74.014946,65.300842 73.727783,72.619186
|
|
16
|
+
C73.305038,83.392784 73.967194,94.208961 74.094269,105.470154
|
|
17
|
+
C74.014198,113.622215 74.007103,121.311104 74.000000,129.000000
|
|
18
|
+
z"/>
|
|
19
|
+
<path fill="#02B8F9" opacity="1.000000" stroke="none"
|
|
20
|
+
d="
|
|
21
|
+
M55.831646,24.987263
|
|
22
|
+
C55.882622,17.303898 55.933598,9.620532 55.992287,1.468583
|
|
23
|
+
C57.714359,1.000000 59.428715,1.000000 61.571537,1.000000
|
|
24
|
+
C62.935467,2.118996 63.652531,3.619331 64.839523,4.299146
|
|
25
|
+
C79.934639,12.944388 95.143890,21.391127 110.202789,30.098177
|
|
26
|
+
C113.169754,31.813677 115.199829,34.217285 115.130432,38.479404
|
|
27
|
+
C114.826759,57.130215 115.039696,75.789001 114.936035,94.444183
|
|
28
|
+
C114.925957,96.259071 114.028610,98.069031 113.543106,99.881279
|
|
29
|
+
C111.785866,99.178764 109.923759,98.661491 108.291847,97.737595
|
|
30
|
+
C104.071419,95.348236 99.952545,92.779510 95.270920,89.778305
|
|
31
|
+
C94.551041,87.492508 94.192467,85.711716 94.182388,83.928963
|
|
32
|
+
C94.126175,73.982719 94.021675,64.033424 94.214966,54.090637
|
|
33
|
+
C94.299431,49.745609 92.637054,46.977737 88.869286,44.893265
|
|
34
|
+
C79.304146,39.601486 69.847221,34.112087 60.402676,28.606253
|
|
35
|
+
C58.740604,27.637325 57.348454,26.205379 55.831646,24.987263
|
|
36
|
+
z"/>
|
|
37
|
+
<path fill="#E0E1E1" opacity="1.000000" stroke="none"
|
|
38
|
+
d="
|
|
39
|
+
M55.511765,24.843748
|
|
40
|
+
C57.348454,26.205379 58.740604,27.637325 60.402676,28.606253
|
|
41
|
+
C69.847221,34.112087 79.304146,39.601486 88.869286,44.893265
|
|
42
|
+
C92.637054,46.977737 94.299431,49.745609 94.214966,54.090637
|
|
43
|
+
C94.021675,64.033424 94.126175,73.982719 94.182388,83.928963
|
|
44
|
+
C94.192467,85.711716 94.551041,87.492508 94.959030,89.641571
|
|
45
|
+
C95.113174,96.778450 95.059792,103.547989 94.999916,110.317474
|
|
46
|
+
C94.955353,115.356888 93.765648,116.126678 89.226906,113.653610
|
|
47
|
+
C84.348854,110.995659 79.607063,108.087631 74.486519,105.147858
|
|
48
|
+
C73.967194,94.208961 73.305038,83.392784 73.727783,72.619186
|
|
49
|
+
C74.014946,65.300842 71.529564,60.999523 64.976448,57.663155
|
|
50
|
+
C54.175705,52.164204 43.839382,45.753078 33.142395,39.427052
|
|
51
|
+
C33.651466,37.940533 34.871948,36.769825 34.908184,35.563541
|
|
52
|
+
C35.101742,29.120428 34.999424,22.668427 34.999424,15.851578
|
|
53
|
+
C43.327053,15.928467 48.536659,22.002995 55.511765,24.843748
|
|
54
|
+
z"/>
|
|
55
|
+
</svg>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
2
|
+
width="100%" viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
|
|
3
|
+
<path fill="#02B7F9" opacity="1.000000" stroke="none"
|
|
4
|
+
d="
|
|
5
|
+
M74.000000,129.000000
|
|
6
|
+
C71.957680,129.000000 69.915367,129.000000 67.772049,128.750992
|
|
7
|
+
C66.708908,127.656410 65.856949,126.618690 64.768005,125.994247
|
|
8
|
+
C49.725960,117.368484 34.689728,108.730858 19.554077,100.271461
|
|
9
|
+
C16.318001,98.462799 14.807114,96.333038 14.920973,92.497559
|
|
10
|
+
C15.172501,84.024582 15.000065,75.539024 15.000205,67.058594
|
|
11
|
+
C15.000402,55.112404 15.000254,43.166214 15.000254,30.236784
|
|
12
|
+
C17.528019,31.219759 19.457926,31.782282 21.209347,32.689411
|
|
13
|
+
C25.178762,34.745327 29.060249,36.971008 33.142395,39.427052
|
|
14
|
+
C43.839382,45.753078 54.175705,52.164204 64.976448,57.663155
|
|
15
|
+
C71.529564,60.999523 74.014946,65.300842 73.727783,72.619186
|
|
16
|
+
C73.305038,83.392784 73.967194,94.208961 74.094269,105.470154
|
|
17
|
+
C74.014198,113.622215 74.007103,121.311104 74.000000,129.000000
|
|
18
|
+
z"/>
|
|
19
|
+
<path fill="#02B8F9" opacity="1.000000" stroke="none"
|
|
20
|
+
d="
|
|
21
|
+
M55.831646,24.987263
|
|
22
|
+
C55.882622,17.303898 55.933598,9.620532 55.992287,1.468583
|
|
23
|
+
C57.714359,1.000000 59.428715,1.000000 61.571537,1.000000
|
|
24
|
+
C62.935467,2.118996 63.652531,3.619331 64.839523,4.299146
|
|
25
|
+
C79.934639,12.944388 95.143890,21.391127 110.202789,30.098177
|
|
26
|
+
C113.169754,31.813677 115.199829,34.217285 115.130432,38.479404
|
|
27
|
+
C114.826759,57.130215 115.039696,75.789001 114.936035,94.444183
|
|
28
|
+
C114.925957,96.259071 114.028610,98.069031 113.543106,99.881279
|
|
29
|
+
C111.785866,99.178764 109.923759,98.661491 108.291847,97.737595
|
|
30
|
+
C104.071419,95.348236 99.952545,92.779510 95.270920,89.778305
|
|
31
|
+
C94.551041,87.492508 94.192467,85.711716 94.182388,83.928963
|
|
32
|
+
C94.126175,73.982719 94.021675,64.033424 94.214966,54.090637
|
|
33
|
+
C94.299431,49.745609 92.637054,46.977737 88.869286,44.893265
|
|
34
|
+
C79.304146,39.601486 69.847221,34.112087 60.402676,28.606253
|
|
35
|
+
C58.740604,27.637325 57.348454,26.205379 55.831646,24.987263
|
|
36
|
+
z"/>
|
|
37
|
+
<path fill="#E0E1E1" opacity="1.000000" stroke="none"
|
|
38
|
+
d="
|
|
39
|
+
M55.511765,24.843748
|
|
40
|
+
C57.348454,26.205379 58.740604,27.637325 60.402676,28.606253
|
|
41
|
+
C69.847221,34.112087 79.304146,39.601486 88.869286,44.893265
|
|
42
|
+
C92.637054,46.977737 94.299431,49.745609 94.214966,54.090637
|
|
43
|
+
C94.021675,64.033424 94.126175,73.982719 94.182388,83.928963
|
|
44
|
+
C94.192467,85.711716 94.551041,87.492508 94.959030,89.641571
|
|
45
|
+
C95.113174,96.778450 95.059792,103.547989 94.999916,110.317474
|
|
46
|
+
C94.955353,115.356888 93.765648,116.126678 89.226906,113.653610
|
|
47
|
+
C84.348854,110.995659 79.607063,108.087631 74.486519,105.147858
|
|
48
|
+
C73.967194,94.208961 73.305038,83.392784 73.727783,72.619186
|
|
49
|
+
C74.014946,65.300842 71.529564,60.999523 64.976448,57.663155
|
|
50
|
+
C54.175705,52.164204 43.839382,45.753078 33.142395,39.427052
|
|
51
|
+
C33.651466,37.940533 34.871948,36.769825 34.908184,35.563541
|
|
52
|
+
C35.101742,29.120428 34.999424,22.668427 34.999424,15.851578
|
|
53
|
+
C43.327053,15.928467 48.536659,22.002995 55.511765,24.843748
|
|
54
|
+
z"/>
|
|
55
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ILoadOptionsFunctions, type INodePropertyOptions, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class AirProcess implements INodeType {
|
|
3
|
+
methods: {
|
|
4
|
+
loadOptions: {
|
|
5
|
+
getModels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
6
|
+
getModelFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
getModelFieldsForFind(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
description: INodeTypeDescription;
|
|
11
|
+
}
|