@klardaten/n8n-nodes-datevconnect 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/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # n8n DATEVConnect
2
+
3
+ This repository provides custom n8n nodes for integrating with the DATEVconnect APIs. It requires the [Klardaten DATEVconnect Gateway](https://klardaten.com/products/datevconnect-gateway) to be set up.
4
+
5
+ ## Available Nodes
6
+
7
+ | Node | Description |
8
+ | ---- | ----------- |
9
+ | `Accounting` | Access DATEV Accounting API for clients, fiscal years, accounts receivable, account postings, and accounting sequences. |
10
+ | `MasterData` | Fetches master data entities from DATEV using the configured credentials. |
11
+ | `Document Management` | Access DATEV Document Management or DMS for documents, structure items, property templates. |
12
+ | `Identity & Access Management` | Manage SCIM-based DATEV IAM resources such as service configuration, schemas, users, and groups. |
13
+
14
+ Refer to the node descriptions inside the n8n editor for input parameters and output structure.
15
+
16
+ ## Installation
17
+
18
+ ### Through the n8n UI
19
+
20
+ 1. Navigate to **Settings → Community Nodes → Install** inside your n8n instance.
21
+ 2. Enter `@klardaten/n8n-nodes-datevconnect` as the package name.
22
+ 3. Confirm the warning prompt and restart n8n so the nodes are registered.
23
+
24
+ ### Manual (filesystem) installation
25
+
26
+ ```bash
27
+ cd ~/.n8n
28
+ npm install @klardaten/n8n-nodes-datevconnect
29
+ ```
30
+
31
+ Copy or symlink the contents of the installed `node_modules/@klardaten/n8n-nodes-datevconnect/dist/{nodes,credentials}` directories into your `~/.n8n/custom/` folder if you prefer the legacy custom-nodes workflow, then restart n8n.
32
+
33
+ ## Configuration
34
+
35
+ 1. **Install dependencies**
36
+ ```bash
37
+ bun install
38
+ ```
39
+ 2. **Build TypeScript** (optional during development; n8n compiles on the fly)
40
+ ```bash
41
+ bun run build
42
+ ```
43
+ 3. **Link the nodes into n8n**
44
+ - Copy or symlink the contents of the `nodes/` and `credentials/` directories into your n8n custom directory (e.g., `~/.n8n/custom/`).
45
+ - Restart the n8n instance so it detects the new nodes.
46
+
47
+ ## Required Credentials
48
+
49
+ You need a Klardaten account and an instance id (of the DATEV instance you want to access).
50
+
51
+ - `email`
52
+ - `password`
53
+ - `clientInstanceId`
54
+
55
+ ## Running Tests
56
+
57
+ Use the Bun test runner to execute the automated tests:
58
+
59
+ ```bash
60
+ bun test
61
+ ```
62
+
63
+ ## Usage in n8n
64
+
65
+ 1. Create a new workflow in n8n.
66
+ 2. Add the **Klardaten DATEVconnect: Master Data** or **Accounting** node and choose the credential you configured.
67
+ 3. Select the desired operation (e.g., list client entries) and configure any filters.
68
+ 4. Execute the workflow or schedule it as part of a larger automation.
69
+
70
+ All nodes authenticate using the stored credentials and interact with their respective DATEVconnect APIs.
71
+
72
+ ## Additional Notes
73
+
74
+ DATEV provides endpoint reference details under
75
+ - [Accounting](https://developer.datev.de/en/product-detail/accounting/1.7.4/reference)
76
+ - [Client Master Data](https://developer.datev.de/en/product-detail/client-master-data/1.7.0/reference).
77
+ - [Document Management](https://developer.datev.de/en/product-detail/document-management/2.3.0/reference)
78
+ - [Identity & Access Management – User Administration](https://developer.datev.de/en/product-detail/identity-and-access-management-user-administration/1.1.2/reference)
@@ -0,0 +1,98 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
6
+ var __toCommonJS = (from) => {
7
+ var entry = __moduleCache.get(from), desc;
8
+ if (entry)
9
+ return entry;
10
+ entry = __defProp({}, "__esModule", { value: true });
11
+ if (from && typeof from === "object" || typeof from === "function")
12
+ __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ }));
16
+ __moduleCache.set(from, entry);
17
+ return entry;
18
+ };
19
+ var __export = (target, all) => {
20
+ for (var name in all)
21
+ __defProp(target, name, {
22
+ get: all[name],
23
+ enumerable: true,
24
+ configurable: true,
25
+ set: (newValue) => all[name] = () => newValue
26
+ });
27
+ };
28
+
29
+ // credentials/DatevConnectApi.credentials.ts
30
+ var exports_DatevConnectApi_credentials = {};
31
+ __export(exports_DatevConnectApi_credentials, {
32
+ DatevConnectApi: () => DatevConnectApi
33
+ });
34
+ module.exports = __toCommonJS(exports_DatevConnectApi_credentials);
35
+
36
+ class DatevConnectApi {
37
+ name = "datevConnectApi";
38
+ displayName = "DATEVconnect API";
39
+ properties = [
40
+ {
41
+ displayName: "Host",
42
+ name: "host",
43
+ type: "string",
44
+ default: "https://api.klardaten.com",
45
+ required: true,
46
+ description: "Base URL of the Klardaten DATEVconnect service, e.g. https://api.klardaten.com"
47
+ },
48
+ {
49
+ displayName: "Email",
50
+ name: "email",
51
+ type: "string",
52
+ default: "",
53
+ required: true,
54
+ description: "Klardaten user login"
55
+ },
56
+ {
57
+ displayName: "Password",
58
+ name: "password",
59
+ type: "string",
60
+ default: "",
61
+ required: true,
62
+ typeOptions: {
63
+ password: true
64
+ },
65
+ description: "Klardaten user password"
66
+ },
67
+ {
68
+ displayName: "Client Instance ID",
69
+ name: "clientInstanceId",
70
+ type: "string",
71
+ default: "",
72
+ required: true,
73
+ description: "Klardaten client instance identifier"
74
+ }
75
+ ];
76
+ test = {
77
+ request: {
78
+ baseURL: "={{ $credentials.host }}",
79
+ url: "/api/auth/login",
80
+ method: "POST",
81
+ json: true,
82
+ body: {
83
+ email: "={{ $credentials.email }}",
84
+ password: "={{ $credentials.password }}"
85
+ }
86
+ },
87
+ rules: [
88
+ {
89
+ type: "responseSuccessBody",
90
+ properties: {
91
+ key: "access_token",
92
+ value: undefined,
93
+ message: "Login successful response must include a access_token."
94
+ }
95
+ }
96
+ ]
97
+ };
98
+ }