n8n-nodes-gereft 0.1.0 → 0.1.2
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 +41 -50
- package/dist/credentials/GereftApi.credentials.js +1 -1
- package/dist/credentials/gereft.dark.png +0 -0
- package/dist/credentials/gereft.png +0 -0
- package/dist/nodes/Gereft/Gereft.node.js +1 -1
- package/dist/nodes/Gereft/gereft.dark.png +0 -0
- package/dist/nodes/Gereft/gereft.png +0 -0
- package/dist/nodes/Gereft/properties.json +1 -1
- package/package.json +2 -1
- package/dist/credentials/gereft.svg +0 -4
- package/dist/nodes/Gereft/gereft.svg +0 -4
package/README.md
CHANGED
|
@@ -1,69 +1,60 @@
|
|
|
1
1
|
# n8n-nodes-gereft
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[`@devlikeapro/n8n-openapi-node`](https://github.com/devlikeapro/n8n-openapi-node) ساخته میشوند.
|
|
3
|
+
An [n8n](https://n8n.io) community node for the Gereft API.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- آبجکتها و آرایههای تو در توی body یک فیلد JSON هستند.
|
|
11
|
-
- endpointهای `multipart` (مثل `POST /media/upload`) پشتیبانی نمیشوند و برای آنها از نود HTTP Request استفاده کنید.
|
|
5
|
+
The node is generated from Gereft's OpenAPI spec, so it covers the whole API: each API section (Invoice, Note, Rfq, …)
|
|
6
|
+
is a **Resource**, and each endpoint is an **Operation**. Required parameters are shown directly. Optional ones are
|
|
7
|
+
under **Additional Fields**, and only the fields you add there are sent. Nested objects and arrays in a request body
|
|
8
|
+
are entered as JSON.
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
The node can also be used as a tool by n8n's AI Agent.
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
pnpm install
|
|
17
|
-
pnpm update # دریافت اسپک از api.gereft.com + build
|
|
18
|
-
pnpm build # فقط build از openapi/gereft.json موجود
|
|
19
|
-
node scripts/fetch-spec.mjs ../backend/dist/public/swagger.json # اسپک از بکاند لوکال
|
|
20
|
-
pnpm e2e # تست end-to-end داخل n8n واقعی (Docker) با mock server
|
|
21
|
-
```
|
|
12
|
+
## Installation
|
|
22
13
|
|
|
23
|
-
|
|
14
|
+
### From the n8n UI (recommended)
|
|
24
15
|
|
|
25
|
-
|
|
16
|
+
1. In n8n, open **Settings → Community Nodes**.
|
|
17
|
+
2. Click **Install**, enter `n8n-nodes-gereft`, accept the risk notice, and click **Install**.
|
|
18
|
+
3. The **Gereft** node now appears in the node panel.
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
To update, open **Settings → Community Nodes** and click **Update** on the package.
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
ریاستارت کنید:
|
|
22
|
+
> Community nodes are only available on self-hosted n8n. The n8n server needs access to `registry.npmjs.org`. If it
|
|
23
|
+
> doesn't have that access, use the manual install below.
|
|
32
24
|
|
|
33
|
-
|
|
34
|
-
services:
|
|
35
|
-
n8n:
|
|
36
|
-
volumes:
|
|
37
|
-
- ./n8n-nodes-gereft/dist:/home/node/.n8n/custom/n8n-nodes-gereft:ro
|
|
38
|
-
```
|
|
25
|
+
### Manual install (offline / no npm access)
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
1. Download the package on a machine with internet access:
|
|
28
|
+
```bash
|
|
29
|
+
npm pack n8n-nodes-gereft
|
|
30
|
+
```
|
|
31
|
+
2. Copy the `.tgz` file into the n8n container and install it:
|
|
32
|
+
```bash
|
|
33
|
+
docker cp n8n-nodes-gereft-<version>.tgz <n8n-container>:/tmp/
|
|
34
|
+
docker exec -u node <n8n-container> sh -c \
|
|
35
|
+
'mkdir -p ~/.n8n/nodes && cd ~/.n8n/nodes && npm install /tmp/n8n-nodes-gereft-<version>.tgz'
|
|
36
|
+
```
|
|
37
|
+
3. Restart n8n: `docker restart <n8n-container>`.
|
|
43
38
|
|
|
44
|
-
|
|
39
|
+
## Credentials
|
|
45
40
|
|
|
46
|
-
|
|
41
|
+
Create a credential of type **Gereft API**:
|
|
47
42
|
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
| Field | Value |
|
|
44
|
+
|----------------|------------------------------------------------|
|
|
45
|
+
| Base URL | `https://api.gereft.com` (default) |
|
|
46
|
+
| Authentication | **API Key** or **Bearer Token (JWT)** |
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
- **API Key**: a server API key. It has full access, but requests are not tied to a user. Endpoints that depend on the
|
|
49
|
+
current user (for example `/auth/me` or "my" lists) won't work with it.
|
|
50
|
+
- **Bearer Token (JWT)**: a Gereft user's token. Requests run as that user, with that user's permissions. The token
|
|
51
|
+
expires and then has to be replaced.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
## Limitations
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
| Base URL | پیشفرض `https://api.gereft.com` |
|
|
58
|
-
| Authentication | `API Key` یا `Bearer Token (JWT)` |
|
|
55
|
+
- File uploads (`multipart/form-data` endpoints such as `POST /media/upload`) aren't supported. Use n8n's
|
|
56
|
+
**HTTP Request** node for those.
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
دارد، ولی **`req.user` ست نمیشود**. endpointهایی که به کاربر جاری نیاز دارند (`/auth/me`، `createdBy`، «درخواستهای من»
|
|
62
|
-
و …) با این روش درست کار نمیکنند.
|
|
63
|
-
- **Bearer Token**: JWT یک کاربر گرفت، با همان سطح دسترسی آن کاربر. توکن منقضی میشود.
|
|
58
|
+
## License
|
|
64
59
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## Tool برای AI Agent
|
|
68
|
-
|
|
69
|
-
نود `usableAsTool` است و میتوان آن را مستقیم به AI Agent در n8n وصل کرد.
|
|
60
|
+
[MIT](LICENSE)
|
|
@@ -5,7 +5,7 @@ class GereftApi {
|
|
|
5
5
|
name = 'gereftApi';
|
|
6
6
|
displayName = 'Gereft API';
|
|
7
7
|
documentationUrl = 'https://api.gereft.com/swagger';
|
|
8
|
-
icon = 'file:gereft.
|
|
8
|
+
icon = { dark: 'file:gereft.dark.png', light: 'file:gereft.png' };
|
|
9
9
|
properties = [
|
|
10
10
|
{
|
|
11
11
|
default: 'https://api.gereft.com',
|
|
Binary file
|
|
Binary file
|
|
@@ -16,7 +16,7 @@ class Gereft {
|
|
|
16
16
|
description: "Interact with the Gereft API",
|
|
17
17
|
displayName: "Gereft",
|
|
18
18
|
group: ["transform"],
|
|
19
|
-
icon: "file:gereft.
|
|
19
|
+
icon: { dark: "file:gereft.dark.png", light: "file:gereft.png" },
|
|
20
20
|
inputs: ["main"],
|
|
21
21
|
name: "gereft",
|
|
22
22
|
outputs: ["main"],
|
|
Binary file
|
|
Binary file
|