n8n-nodes-didomi 1.0.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/LICENSE.md +19 -0
- package/README.md +157 -0
- package/dist/credentials/DidomiApi.credentials.d.ts +10 -0
- package/dist/credentials/DidomiApi.credentials.js +60 -0
- package/dist/credentials/DidomiApi.credentials.js.map +1 -0
- package/dist/credentials/icons/didomi.svg +5 -0
- package/dist/nodes/Didomi/Didomi.node.d.ts +5 -0
- package/dist/nodes/Didomi/Didomi.node.js +851 -0
- package/dist/nodes/Didomi/Didomi.node.js.map +1 -0
- package/dist/nodes/Didomi/Didomi.node.json +20 -0
- package/dist/nodes/Didomi/didomi.svg +5 -0
- package/dist/package.json +60 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +11 -0
- package/package.json +60 -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,157 @@
|
|
|
1
|
+
# n8n-nodes-didomi
|
|
2
|
+
|
|
3
|
+
This is an n8n community node. It lets you interact with Didomi in your n8n workflows.
|
|
4
|
+
|
|
5
|
+
Didomi specializes in privacy management solutions, enabling businesses to collect user consent, manage preferences, and ensure compliance while maintaining seamless digital experiences and building user trust.
|
|
6
|
+
|
|
7
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
|
|
8
|
+
|
|
9
|
+
[Installation](#installation)
|
|
10
|
+
[Credentials](#credentials)
|
|
11
|
+
[Operations](#operations)
|
|
12
|
+
[Using as a Tool](#using-as-a-tool)
|
|
13
|
+
[Compatibility](#compatibility)
|
|
14
|
+
[Resources](#resources)
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
19
|
+
|
|
20
|
+
Alternatively, you can manually install it:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
git clone https://github.com/elevate-agency-data/n8n-nodes-didomi.git
|
|
24
|
+
cd n8n-nodes-didomi
|
|
25
|
+
npm install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then, place the node file in the `~/.n8n/custom-nodes` directory (or follow instructions specific to your n8n installation).
|
|
29
|
+
|
|
30
|
+
## Credentials
|
|
31
|
+
|
|
32
|
+
To use this node, you need an Didomi API key with access to Didomi.
|
|
33
|
+
|
|
34
|
+
## Operations
|
|
35
|
+
|
|
36
|
+
This node supports the following operations within Didomi:
|
|
37
|
+
|
|
38
|
+
* **Compliance Report**
|
|
39
|
+
- Creates a property
|
|
40
|
+
- Creates a report
|
|
41
|
+
- Deletes a property
|
|
42
|
+
- Gets a property
|
|
43
|
+
- Gets a report
|
|
44
|
+
- Lists all properties
|
|
45
|
+
- Lists all reports
|
|
46
|
+
- Updates a property
|
|
47
|
+
* **Consent and Preference**
|
|
48
|
+
- Approves pending events
|
|
49
|
+
- Creates a consent event
|
|
50
|
+
- Creates a consent user
|
|
51
|
+
- Creates a secret
|
|
52
|
+
- Creates a token
|
|
53
|
+
- Delete a consent event
|
|
54
|
+
- Gets a consent user
|
|
55
|
+
- Gets a pending event
|
|
56
|
+
- Gets a proof
|
|
57
|
+
- Lists all consent users
|
|
58
|
+
- Lists all pending events
|
|
59
|
+
- Uploads a proof
|
|
60
|
+
* **Data Manager**
|
|
61
|
+
- Adds a preference into your configuration tree
|
|
62
|
+
- Adds a purpose into your configuration tree
|
|
63
|
+
- Creates a preference
|
|
64
|
+
- Creates a purpose
|
|
65
|
+
- Deletes a preference
|
|
66
|
+
- Deletes a purpose
|
|
67
|
+
- Deletes a selected preference
|
|
68
|
+
- Deletes a selected purpose
|
|
69
|
+
- Gets a configuration tree
|
|
70
|
+
- Gets a preference
|
|
71
|
+
- Gets a purpose
|
|
72
|
+
- Gets available regulations and related information
|
|
73
|
+
- Lists all preferences
|
|
74
|
+
- Lists all purposes
|
|
75
|
+
- Lists all user rights
|
|
76
|
+
- Updates a preference
|
|
77
|
+
- Updates a purpose
|
|
78
|
+
* **Privacy Request**
|
|
79
|
+
- Configures the recipients of an email
|
|
80
|
+
- Creates a link
|
|
81
|
+
- Creates a new template email
|
|
82
|
+
- Creates a note
|
|
83
|
+
- Creates a request
|
|
84
|
+
- Gets a note
|
|
85
|
+
- Gets a request
|
|
86
|
+
- Gets provider configuration schemas
|
|
87
|
+
- Lists all notes
|
|
88
|
+
- Lists all requests
|
|
89
|
+
- Updates a request
|
|
90
|
+
* **Widget**
|
|
91
|
+
- Creates a consent notice
|
|
92
|
+
- Creates a widget
|
|
93
|
+
- Creates an authentication provider
|
|
94
|
+
- Deletes a widget
|
|
95
|
+
- Gets a custom theme
|
|
96
|
+
- Gets a deployment
|
|
97
|
+
- Gets a widget
|
|
98
|
+
- Gets an archived widget
|
|
99
|
+
- Gets an entity
|
|
100
|
+
- Gets the current draft configuration for a notice
|
|
101
|
+
- Lists all archived widget
|
|
102
|
+
- Lists all custom themes
|
|
103
|
+
- Lists all deployments
|
|
104
|
+
- Lists all entities
|
|
105
|
+
- Lists all widgets
|
|
106
|
+
- Publishes a widget
|
|
107
|
+
- Publishes the current draft configuration for a notice
|
|
108
|
+
- Sets a default authentication provider
|
|
109
|
+
- Updates a component
|
|
110
|
+
- Updates a custom theme
|
|
111
|
+
- Updates a widget
|
|
112
|
+
- Updates an entity
|
|
113
|
+
- Updates multiple components
|
|
114
|
+
- Updates multiple entities
|
|
115
|
+
- Updates the current draft configuration for a notice
|
|
116
|
+
|
|
117
|
+
Retrieve information from the [Didomi API](https://developers.didomi.io/api/introduction).
|
|
118
|
+
|
|
119
|
+
## Using as a Tool
|
|
120
|
+
|
|
121
|
+
This node can be used as a tool in n8n AI Agents. To enable community nodes as tools, you need to set the `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE` environment variable to `true`.
|
|
122
|
+
|
|
123
|
+
### Setting the Environment Variable
|
|
124
|
+
|
|
125
|
+
**If you're using a bash/zsh shell:**
|
|
126
|
+
```bash
|
|
127
|
+
export N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
|
|
128
|
+
n8n start
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**If you're using Docker:**
|
|
132
|
+
Add to your docker-compose.yml file:
|
|
133
|
+
```yaml
|
|
134
|
+
environment:
|
|
135
|
+
- N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**If you're using the desktop app:**
|
|
139
|
+
Create a `.env` file in the n8n directory:
|
|
140
|
+
```
|
|
141
|
+
N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**If you want to set it permanently on Mac/Linux:**
|
|
145
|
+
Add to your `~/.zshrc` or `~/.bash_profile`:
|
|
146
|
+
```bash
|
|
147
|
+
export N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Compatibility
|
|
151
|
+
|
|
152
|
+
- Tested with: 1.84.1 (Success)
|
|
153
|
+
|
|
154
|
+
## Resources
|
|
155
|
+
|
|
156
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
157
|
+
- [Didomi API documentation](https://developers.didomi.io/api/introduction)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
|
|
2
|
+
export declare class DidomiApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
icon: Icon;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DidomiApi = void 0;
|
|
4
|
+
class DidomiApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'didomiApi';
|
|
7
|
+
this.displayName = 'Didomi API';
|
|
8
|
+
this.documentationUrl = 'https://developers.didomi.io/api/introduction/authentication';
|
|
9
|
+
this.icon = 'file:icons/didomi.svg';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'API Key',
|
|
13
|
+
name: 'apiKey',
|
|
14
|
+
type: 'string',
|
|
15
|
+
typeOptions: {
|
|
16
|
+
password: true
|
|
17
|
+
},
|
|
18
|
+
default: '',
|
|
19
|
+
required: true,
|
|
20
|
+
description: 'Private API key from the Didomi console'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'API Secret',
|
|
24
|
+
name: 'apiSecret',
|
|
25
|
+
type: 'string',
|
|
26
|
+
typeOptions: {
|
|
27
|
+
password: true
|
|
28
|
+
},
|
|
29
|
+
default: '',
|
|
30
|
+
required: true,
|
|
31
|
+
description: 'Secret API key from the Didomi console'
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
this.authenticate = {
|
|
35
|
+
type: 'generic',
|
|
36
|
+
properties: {
|
|
37
|
+
headers: {
|
|
38
|
+
'Content-Type': 'application/json'
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
this.test = {
|
|
43
|
+
request: {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
url: 'https://api.didomi.io/v1/sessions',
|
|
46
|
+
headers: {
|
|
47
|
+
'Content-Type': 'application/json'
|
|
48
|
+
},
|
|
49
|
+
body: {
|
|
50
|
+
type: 'api-key',
|
|
51
|
+
key: '={{$credentials.apiKey}}',
|
|
52
|
+
secret: '={{$credentials.apiSecret}}'
|
|
53
|
+
},
|
|
54
|
+
json: true,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.DidomiApi = DidomiApi;
|
|
60
|
+
//# sourceMappingURL=DidomiApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidomiApi.credentials.js","sourceRoot":"","sources":["../../credentials/DidomiApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QACnB,gBAAW,GAAG,YAAY,CAAC;QAC3B,qBAAgB,GAAG,8DAA8D,CAAC;QACjF,SAAI,GAAS,uBAAuB,CAAC;QACtC,eAAU,GAAsB;YAC7B;gBACD,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,yCAAyC;aACtD;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,wCAAwC;aACrD;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACJ,cAAc,EAAE,kBAAkB;iBACtC;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACL,MAAM,EAAE,MAAM;gBACjB,GAAG,EAAE,mCAAmC;gBACxC,OAAO,EAAE;oBACJ,cAAc,EAAE,kBAAkB;iBACtC;gBACD,IAAI,EAAE;oBACL,IAAI,EAAE,SAAS;oBACf,GAAG,EAAE,0BAA0B;oBAC/B,MAAM,EAAE,6BAA6B;iBACrC;gBACD,IAAI,EAAE,IAAI;aACV;SACD,CAAC;IACH,CAAC;CAAA;AAvDD,8BAuDC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="132" height="132" viewBox="0 0 132 132" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="132" height="132" rx="66" fill="#2E62D6"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M36.5623 85.552C36.5623 85.909 36.8517 86.1984 37.2087 86.1984H54.9731C59.3008 86.1984 63.1446 85.3819 66.488 83.7294L66.4933 83.7268C69.8318 82.0383 72.4553 79.6887 74.3463 76.6785L74.3483 76.6754C76.2451 73.6172 77.1826 70.0508 77.1826 66C77.1826 61.9135 76.2458 58.3451 74.3463 55.3215C72.4549 52.3107 69.8305 49.979 66.4906 48.3277C63.1466 46.6371 59.3018 45.8015 54.9731 45.8015H37.2087C36.8517 45.8015 36.5623 46.0909 36.5623 46.4479V85.552ZM65.1984 72.095L65.1934 72.1035C64.2151 73.8156 62.8195 75.1446 60.9898 76.0951C59.1999 77.0071 57.0524 77.4759 54.5262 77.4759H46.9049V54.5241H54.5262C57.05 54.5241 59.1949 55.0105 60.9832 55.9573L60.9897 55.9607L60.9966 55.9642C62.8226 56.8772 64.216 58.1859 65.1934 59.8964L65.1969 59.9024L65.2014 59.91C66.2096 61.5787 66.7283 63.5995 66.7283 66C66.7283 68.3608 66.2106 70.3848 65.1984 72.095Z" fill="white"/>
|
|
4
|
+
<path d="M85.0953 85.552C85.0953 85.909 85.3847 86.1984 85.7417 86.1984H94.7915C95.1485 86.1984 95.4379 85.909 95.4379 85.552V46.4479C95.4379 46.0909 95.1485 45.8015 94.7915 45.8015V45.8015C89.4358 45.8015 85.0936 50.142 85.0932 55.4977C85.0924 65.5158 85.0953 75.5339 85.0953 85.552Z" fill="white"/>
|
|
5
|
+
</svg>
|